Logo

Programming-Idioms

History of Idiom 39 > diff from v34 to v35

Edit summary for version 35 by j:
[Scala] j

Version 34

2017-06-29, 14:22:39

Version 35

2017-07-05, 21:57:12

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