Instance Method

localizedStandardRange(of:)

Finds and returns the range of the first occurrence of a given string within the receiver by performing a case and diacritic insensitive, locale-aware search.

Declaration

func localizedStandardRange(of str: String) -> NSRange

Parameters

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.