contains(_:)
Returns a Boolean value indicating whether the string contains a given string by performing a case-sensitive, locale-unaware search.
Declaration
func contains(_ str: String) -> BoolParameters
- str:
The string to search for. This value must not be
nil.
Return Value
Discussion
Calling this method is equivalent to calling range(of:options:) with no options.
See Also
Finding Characters and Substrings
localizedCaseInsensitiveContains(_:)localizedStandardContains(_:)rangeOfCharacter(from:)rangeOfCharacter(from:options:)rangeOfCharacter(from:options:range:)range(of:)range(of:options:)range(of:options:range:)range(of:options:range:locale:)localizedStandardRange(of:)enumerateLines(_:)enumerateSubstrings(in:options:using:)