Logo

Programming-Idioms

History of Idiom 38 > diff from v33 to v34

Edit summary for version 34 by :
New Lua implementation by user [jparoz]

Version 33

2016-01-02, 00:37:57

Version 34

2016-02-16, 17:09:36

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 = s:sub(i, j-1)