Logo

Programming-Idioms

History of Idiom 41 > diff from v40 to v41

Edit summary for version 41 by programming-idioms.org:
[Scala] Var name s

Version 40

2018-01-03, 23:59:44

Version 41

2018-01-04, 00:00:29

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
"SomeString".reverse
Code
s.reverse