Logo

Programming-Idioms

History of Idiom 39 > diff from v9 to v10

Edit summary for version 10 by :

Version 9

2015-08-20, 18:22:04

Version 10

2015-08-21, 23:16:23

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 ok = s.contains(word);
Code
var ok = s.contains(word);
Comments bubble
Argument of contains must be a Pattern.
Comments bubble
Argument of contains must be a Pattern.
Doc URL
https://api.dartlang.org/apidocs/channels/stable/dartdoc-viewer/dart-core.String#id_contains
Origin
https://api.dartlang.org/apidocs/channels/stable/dartdoc-viewer/dart-core.String#id_contains