Reputation: 23
Is the a way to get the NSRange of an NSString in an NSString?
Upvotes: 1
Views: 3800
Reputation: 81858
You're making this up, right? Or is there some hidden clue in your question that makes rangeOfString:
the wrong answer?
Upvotes: -3
Reputation: 8796
Did you look in the documentation?
NSString has the following method:
- (NSRange)rangeOfString:(NSString *)aString
The NSString class reference at developer.apple.com says of this method:
Finds and returns the range of the first occurrence of a given string within the receiver.
Upvotes: 8