Logo

Programming-Idioms

History of Idiom 39 > diff from v14 to v15

Edit summary for version 15 by :

Version 14

2015-09-03, 15:42:42

Version 15

2015-09-03, 16:14:26

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 = word `isInfixOf` s