Logo

Programming-Idioms

History of Idiom 39 > diff from v40 to v41

Edit summary for version 41 by miguel:
New Kotlin implementation by user [miguel]

Version 40

2019-02-16, 17:44:50

Version 41

2019-09-26, 22:35:42

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)