Logo

Programming-Idioms

History of Idiom 38 > diff from v25 to v26

Edit summary for version 26 by :
New Erlang implementation by user [elbrujohalcon]

Version 25

2015-11-30, 12:37:28

Version 26

2015-12-18, 03:18:48

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)

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)

Code
T = string:sub_string(I, J-1).
Comments bubble
Erlang uses 1-based lists