Reverse sentence | Reverse Text

By Phoenix- on Jul 30, 2009

Using $reverse will reverse the sentence by words.
Example: $reverse(I have a large fox.) --> fox. large a have I

Using $reveret will reverse the sentence entirely by all the words including letters.
Example: $reverset(Hello) --> olleH

I didn't make $reverset however I am posting this here for others.

alias reverse { return $regsubex($1-,/([^\s]+)/g,$regml($calc($regml(0) - \n + 1))) }

alias reverset { var %o = $len($1-),%i
while (%o) { %i = $+(%i,$replace($mid($1-,%o,1),$chr(32),$chr(160))) | dec %o } 
if ($isid) return %i | else say %i }

Comments

Sign in to comment.
Şąŧąŋ   -  Aug 08, 2009

lol this script is useless at the same time fun :D i like it

 Respond  
asakura   -  Aug 02, 2009

i like to eat tsaotderettub apparently :D

 Respond  
PuNkTuReD   -  Jul 31, 2009

lol sunslayer

 Respond  
Phoenix-   -  Jul 30, 2009

Oh man it is broke.
nice :P

 Respond  
sunslayer   -  Jul 30, 2009

tbh i couldnt resist.

 Respond  
sunslayer   -  Jul 30, 2009

ummmm i think this is broken

$reverset(racecar) ---> racecar
$reverset(radar) ---> radar
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.