Logo

Programming-Idioms

History of Idiom 39 > diff from v15 to v16

Edit summary for version 16 by :

Version 15

2015-09-03, 16:14:26

Version 16

2015-09-03, 21:06:16

Idiom #39 Check if string contains a word

Set boolean ok to true if string word is contained in string s as a substring, or to false otherwise.

Idiom #39 Check if string contains a word

Set boolean ok to true if string word is contained in string s as a substring, or to false otherwise.

Code
ok = String.contains?(s, word)