Logo

Programming-Idioms

History of Idiom 41 > diff from v12 to v13

Edit summary for version 13 by :

Version 12

2015-08-20, 18:55:43

Version 13

2015-08-21, 23:18:20

Idiom #41 Reverse a string

Create string t containing the same characters as string s, in reverse order.
Original string s must remain unaltered. Each character must be handled correctly regardless its number of bytes in memory.

Idiom #41 Reverse a string

Create string t containing the same characters as string s, in reverse order.
Original string s must remain unaltered. Each character must be handled correctly regardless its number of bytes in memory.

Code
t = s.reverse
Code
t = s.reverse
Doc URL
http://ruby-doc.org/core-1.8.6/String.html#method-i-reverse-21
Origin
http://ruby-doc.org/core-1.8.6/String.html#method-i-reverse-21