localizedStandardRange(of:)
Finds and returns the range of the first occurrence of a given string within the string by performing a case and diacritic insensitive, locale-aware search.
Declaration
func localizedStandardRange(of str: String) -> NSRangeParameters
- str:
The string to search for. This value must not be
nil.
Return Value
The range of the first occurrence of str in the receiver. Returns {``NSNotFound``, 0} if str is not found.
See Also
Finding Characters and Substrings
contains(_:)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:)enumerateLines(_:)enumerateSubstrings(in:options:using:)