Logo

Programming-Idioms

History of Idiom 41 > diff from v37 to v38

Edit summary for version 38 by programming-idioms.org:
Admin deletes impl 303

Version 37

2018-01-03, 23:27:18

Version 38

2018-01-03, 23:34:01

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.

Illustration

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.

Illustration
Code
$reversed = reverse "reversing a string is simple";
Comments bubble
The reverse function reverses a string or a list.