Logo

Programming-Idioms

History of Idiom 38 > diff from v14 to v15

Edit summary for version 15 by :

Version 14

2015-08-22, 19:15:19

Version 15

2015-08-22, 19:16:14

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 := copy(s, i + 1, j);
Code
t := copy(s, i + 1, j - i);
Comments bubble
assuming ansistring, so first character is at position 1. This artifact is due to the internal ref-counting payload.
Comments bubble
assuming ansistring, so first character is at position 1. This artifact is due to the internal ref-counting payload.