Gammon Forum
Entire forum
MUSHclient
General
Reversing text, is there a simple solution?
Reversing text, is there a simple solution?
|
It is now over 60 days since the last post. This thread is closed.
  Refresh page
Posted by
| Desert_Wanderer
(5 posts) bio
|
Date
| Fri 25 Jul 2003 04:34 PM (UTC) |
Message
| Is there a simple solution to reversing text?
Example using the alias "backsay":
>backsay "this is a test"
would come out as: Player says, "tset a si siht"
I've been reading and searching for a method, but I haven't seen one yet. Thanks in advance.
-DW | top |
|
Posted by
| Sleeve
(31 posts) bio
|
Date
| Reply #1 on Fri 25 Jul 2003 05:16 PM (UTC) |
Message
| If you are using VBScript, you can do something like this
Dim test
test = StrReverse("this is a test")
| top |
|
Posted by
| Nick Gammon
Australia (22,975 posts) bio
Forum Administrator |
Date
| Reply #2 on Fri 25 Jul 2003 10:18 PM (UTC) Amended on Fri 01 Aug 2003 06:21 AM (UTC) by Nick Gammon
|
Message
| So, to put that into a ready-to-use alias:
<aliases>
<alias
match="backsay *"
enabled="y"
send_to="12"
sequence="100"
>
<send>Send "say " & StrReverse ("%1")</send>
</alias>
</aliases>
Example
backsay hi there
You say 'ereht ih'
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
Posted by
| Kyrs
(6 posts) bio
|
Date
| Reply #3 on Fri 01 Aug 2003 03:46 AM (UTC) |
Message
| I received this error when I attempted to paste the alias.
Line 8: No closing ";" in XML entity argument "&" (problem in this file)
What's that mean? | top |
|
Posted by
| Nick Gammon
Australia (22,975 posts) bio
Forum Administrator |
Date
| Reply #4 on Fri 01 Aug 2003 06:22 AM (UTC) |
Message
| Sorry, I should have had & rather than &.
I have fixed the post above, try again with the correction. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
13,229 views.
It is now over 60 days since the last post. This thread is closed.
  Refresh page
top
Quick links:
MUSHclient.
MUSHclient help.
Forum shortcuts.
Posting templates.
Lua modules.
Lua documentation.
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.