Logo

Programming-Idioms

History of Idiom 39 > diff from v35 to v36

Edit summary for version 36 by programming-idioms.org:
Restored version 34

Version 35

2017-07-05, 21:57:12

Version 36

2017-07-07, 18:37:07

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
val excludeTextTokens = Set("none","approx")
Code
val ok = s.contains(word)