Logo

Programming-Idioms

History of Idiom 96 > diff from v21 to v22

Edit summary for version 22 by :
New Ruby implementation by user [steenslag]

Version 21

2016-02-23, 21:03:32

Version 22

2016-04-06, 19:32:24

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 = s.start_with?(prefix)