Logo

Programming-Idioms

History of Idiom 41 > diff from v2 to v3

Edit summary for version 3 by :

Version 2

2015-07-31, 19:20:27

Version 3

2015-08-01, 16:59:43

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
s = t.split("").reverse().join("");