Re: reverse searching
Re: reverse searching
- Subject: Re: reverse searching
- From: David Dunham <email@hidden>
- Date: Sat, 22 Oct 2005 15:29:29 -0700
Robert
I would like to know if any of you have found a way to reverse
search a string for the "last" occurance of something like "\n"
From NSStrings.h:
/* These options apply to the various search/find and comparison
methods (except where noted).
*/
enum {
NSCaseInsensitiveSearch = 1,
NSLiteralSearch = 2, /* Exact
character-by-character equivalence */
NSBackwardsSearch = 4, /* Search from end of source string */
NSAnchoredSearch = 8, /* Search is limited to start
(or end, if NSBackwardsSearch) of source string */
NSNumericSearch = 64 /* Added in 10.2; Numbers
within strings are compared using numeric value, that is, Foo2.txt <
Foo7.txt < Foo25.txt; only applies to compare methods, not find */
};
If you have a CFString, there are comparable constants in CFString.h.
I haven't used these; it appears that they might not apply to all
search functions.
--
David Dunham A Sharp, LLC
Voice/Fax: 206 783 7404 http://a-sharp.com
Efficiency is intelligent laziness.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden