Logo

Programming-Idioms

History of Idiom 38 > diff from v50 to v51

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

Version 50

2019-09-30, 20:06:04

Version 51

2019-10-14, 12:24:18

Idiom #38 Extract a substring

Find substring t consisting in characters i (included) to j (excluded) of string s.
(character indexes start at 0 unless specified otherwise)

Illustration

Idiom #38 Extract a substring

Find substring t consisting in characters i (included) to j (excluded) of string s.
(character indexes start at 0 unless specified otherwise)

Illustration
Code
t = String.slice(s, i..j-1)
Code
t = String.slice(s, i..j-1)
Doc URL
http://elixir-lang.org/docs/stable/elixir/String.html#slice/2
Doc URL
http://elixir-lang.org/docs/stable/elixir/String.html#slice/2
Demo URL
http://play.elixirbyexample.com/s/8fcff9b61e