contains method

  1. @DomName('DOMStringList.contains')
  2. @DocsEditable()
bool contains(String string)

Returns true if the collection contains an element equal to element.

This operation will check each element in order for being equal to element, unless it has a more efficient way to find an element equal to element.

The equality used to determine whether element is equal to an element of the iterable defaults to the Object.== of the element.

Some types of iterable may have a different equality used for its elements. For example, a Set may have a custom equality (see Set.identity) that its contains uses. Likewise the Iterable returned by a Map.keys call should use the same equality that the Map uses for keys.

Source

@DomName('DOMStringList.contains')
@DocsEditable()
bool contains(String string) =>
    _blink.BlinkDOMStringList.instance.contains_Callback_1_(this, string);

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