Logo

Programming-Idioms

History of Idiom 41 > diff from v15 to v16

Edit summary for version 16 by :

Version 15

2015-09-03, 15:23:57

Version 16

2015-09-04, 12:07:58

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 = String.reverse(s)
Doc URL
http://elixir-lang.org/docs/v1.0/elixir/String.html#reverse/1
Demo URL
http://play.elixirbyexample.com/s/9997b7b33f