Logo

Programming-Idioms

History of Idiom 97 > diff from v32 to v33

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

Version 32

2019-02-02, 02:50:35

Version 33

2019-02-02, 02:51:41

Idiom #97 Check string suffix

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

Illustration

Idiom #97 Check string suffix

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

Illustration
Extra Keywords
tail
Extra Keywords
tail
Code
val b = s.endsWith(suffix)