Logo

Programming-Idioms

History of Idiom 96 > diff from v35 to v36

Edit summary for version 36 by Debaran:
New Scala implementation by user [Debaran]

Version 35

2019-01-06, 03:36:07

Version 36

2019-02-02, 02:53:12

Idiom #96 Check string prefix

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

Illustration

Idiom #96 Check string prefix

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

Illustration
Code
val b = s.startsWith(prefix)