contains abstract method

bool contains(Pattern other, [ int startIndex = 0 ])

Returns true if this string contains a match of other:

var string = 'Dart strings';
string.contains('D');                     // true
string.contains(new RegExp(r'[A-Z]'));    // true

If startIndex is provided, this method matches only at or after that index:

string.contains('X', 1);                  // false
string.contains(new RegExp(r'[A-Z]'), 1); // false

startIndex must not be negative or greater than length.

Source

bool contains(Pattern other, [int startIndex = 0]);

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-core/String/contains.html