Searching for "whole word" in NSString
Searching for "whole word" in NSString
- Subject: Searching for "whole word" in NSString
- From: John Stiles <email@hidden>
- Date: Tue, 29 Jan 2008 10:12:21 -0800
I'm trying to find a substring in an NSString. But I want to find whole
words (e.g. like in the Find panel when you choose "Full word" from the
popup, rather than "Contains" or "Starts With").
Unless I'm missing something, it looks like NSString's
-rangeOfString:options:range:locale: doesn't have an option for finding
whole words.
How does the Find panel do it, then? Am I going to have to "roll my own"
code for string searching? That sounds error-prone to me; I'd much
rather have the OS do it.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden