• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: reverse searching
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: Release_settings
  • Next by Date: Re: Speeding up XCode?
  • Previous by thread: Re: reverse searching
  • Next by thread: Release_settings
  • Index(es):
    • Date
    • Thread