Logo

Programming-Idioms

History of Idiom 96 > diff from v14 to v15

Edit summary for version 15 by :
New Pascal implementation by user [Bart]

Version 14

2016-01-02, 01:16:29

Version 15

2016-01-15, 15:36:59

Idiom #96 Check string prefix

Set boolean b to true if string s starts with prefix prefix, false otherwise.

Idiom #96 Check string prefix

Set boolean b to true if string s starts with prefix prefix, false otherwise.

Code
b := pos(prefix, s) = 1;
Comments bubble
Strings in Pascal start at index 1