Logo

Programming-Idioms

History of Idiom 41 > diff from v60 to v61

Edit summary for version 61 by programming-idioms.org:
[Elixir] Dead link: play.elixirbyexample.com has been down for a while

Version 60

2019-09-30, 11:39:16

Version 61

2019-10-14, 12:24:30

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