Logo

Programming-Idioms

History of Idiom 38 > diff from v53 to v54

Edit summary for version 54 by programming-idioms.org:
[JS] +DocURL

Version 53

2019-12-08, 00:39:12

Version 54

2020-01-13, 14:27:42

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 = s.substring(i, j);
Code
t = s.substring(i, j);
Doc URL
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring