Logo

Programming-Idioms

History of Idiom 39 > diff from v26 to v27

Edit summary for version 27 by programming-idioms.org:
[Csharp] Boolean variable name is ok

Version 26

2016-05-28, 18:47:51

Version 27

2016-11-11, 19:59:49

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
var b = s.Contains(word);
Code
var ok = s.Contains(word);