Logo

Programming-Idioms

History of Idiom 46 > diff from v16 to v17

Edit summary for version 17 by :

Version 16

2015-09-03, 15:41:38

Version 17

2015-09-04, 00:46:14

Idiom #46 Extract beginning of string (prefix)

Create string t consisting of the 5 first characters of string s.

Idiom #46 Extract beginning of string (prefix)

Create string t consisting of the 5 first characters of string s.

Code
t = String.slice(s, 0, 5)
Doc URL
http://elixir-lang.org/docs/stable/elixir/String.html#slice/3