Finds and returns the range of the first occurrence of a given string, within the given range of the string, subject to given options.
- iOS 2.0+
- macOS 10.0+
- tvOS 9.0+
- watchOS 2.0+
The string for which to search.
A mask specifying search options. The following options may be specified by combining them with the C bitwise
NSAnchored. See String Programming Guide for details on these options.
The range within the receiver for which to search for
Of Receiver To Search
NSRange structure giving the location and length in the receiver of
in the receiver, modulo the options in
mask. The range returned is relative to the start of the string, not to the passed-in range. Returns
, 0} if
is not found or is empty (
NSString objects are compared by checking the Unicode canonical equivalence of their code point sequences. T
he length of the returned range and that of
may differ if equivalent composed character sequences are matched.