[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  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] Refresh page


Posted by Desert_Wanderer   (5 posts)  [Biography] 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
[Go to top] top

Posted by Sleeve   (31 posts)  [Biography] 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")
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] 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 " &amp; StrReverse ("%1")</send>
  </alias>
</aliases>



Example

backsay hi there
You say 'ereht ih'



- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Kyrs   (6 posts)  [Biography] 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?
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #4 on Fri 01 Aug 2003 06:22 AM (UTC)
Message
Sorry, I should have had &amp; rather than &.

I have fixed the post above, try again with the correction.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] 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] Refresh page

Go to topic:           Search the forum


[Go to top] 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.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]