Logo

Programming-Idioms

History of Idiom 38 > diff from v36 to v37

Edit summary for version 37 by :
New Ada implementation by user [Smaehtin]

Version 36

2016-02-17, 11:19:13

Version 37

2016-02-17, 15:52: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 := S (I .. J - 1);
Comments bubble
In Ada, strings use 1-based indexing

In Ada, J is included by default when slicing