• 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: Parsing NSString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Parsing NSString


  • Subject: Re: Parsing NSString
  • From: "Seth A. Roby" <email@hidden>
  • Date: Mon, 24 Jan 2005 22:02:12 -0800

On Jan 24, 2005, at 6:17 PM, Henry Maddocks wrote:
<x-tad-bigger>- (</x-tad-bigger><x-tad-bigger>NSArray</x-tad-bigger><x-tad-bigger> *)componentsSeparatedByString:(NSString *)</x-tad-bigger>separator

But...

NSString* argList = @"command arg1 arg2 \t arg3 \t\targ4";

[argList componentsSeparatedByString:@" "];
// yields: @"arg1", @"arg2", @"\t", @"arg3", @"\t\targ4"
[argList componentsSeparatedByString:@"\t"];
// yields: @"arg1 arg2 ", @" arg3 ", @"", @"arg4"

There's no (easy) way to do a componentsSeperatedByAnyOfTheseStrings:, unfortunately.

Seth A. Roby The Amazing Llama < mail or AIM me at tallama at mac dot com>
"Life is like an exploded clown. It's really funny until you figure out what just happened."

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Parsing NSString
      • From: Jonathan Jackel <email@hidden>
    • Re: Parsing NSString
      • From: Clark Cox <email@hidden>
    • Re: Parsing NSString
      • From: Henry Maddocks <email@hidden>
References: 
 >Parsing NSString (From: "Michael A. Crawford" <email@hidden>)
 >Re: Parsing NSString (From: Henry Maddocks <email@hidden>)

  • Prev by Date: Re: Japanese characters appearing in my apps name?
  • Next by Date: Re: Parsing NSString
  • Previous by thread: Re: Parsing NSString
  • Next by thread: Re: Parsing NSString
  • Index(es):
    • Date
    • Thread