Logo

Programming-Idioms

History of Idiom 97 > diff from v17 to v18

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

Version 17

2016-02-23, 13:28:33

Version 18

2016-04-06, 20:06:24

Idiom #97 Check string suffix

Set boolean b to true if string s ends with suffix suffix, false otherwise.

Idiom #97 Check string suffix

Set boolean b to true if string s ends with suffix suffix, false otherwise.

Code
b = s.end_with?(suffix)