Logo

Programming-Idioms

History of Idiom 41 > diff from v68 to v69

Edit summary for version 69 by programming-idioms.org:
[Elixir] 404

Version 68

2020-03-20, 17:57:00

Version 69

2020-05-21, 20:35:38

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
Variables
t,s
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
https://hexdocs.pm/elixir/String.html#reverse/1