• 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: Henry Maddocks <email@hidden>
  • Date: Tue, 25 Jan 2005 15:17:48 +1300

componentsSeparatedByString:

<x-tad-bigger>- (</x-tad-bigger><x-tad-bigger>NSArray</x-tad-bigger><x-tad-bigger> *)componentsSeparatedByString:(NSString *)</x-tad-bigger>separator
Returns an NSArray containing substrings from the receiver that have been divided by separator. The substrings in the array appear in the order they did in the receiver. If the string begins or ends with the separator, the first or last substring, respectively, is empty. For example, this code excerpt:

<x-tad-bigger>NSString *list = @"wrenches, hammers, saws";

NSArray *listItems = [list componentsSeparatedByString:@", "];

</x-tad-bigger>

See Also:
<x-tad-bigger>– componentsJoinedByString:</x-tad-bigger> (NSArray), <x-tad-bigger>– pathComponents


</x-tad-bigger>

On 25/01/2005, at 3:12 PM, Michael A. Crawford wrote:

Does anyone know of a quick & easy way to parse an NSString containing text seperated by white-space (i.e. command-line args) into an NSArray?

-Michael

----------------------
There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies.
And the other way is to make it so complicated that there are no obvious deficiencies.

-- C.A.R. Hoare

_______________________________________________
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

 _______________________________________________
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: "Seth A. Roby" <email@hidden>
References: 
 >Parsing NSString (From: "Michael A. Crawford" <email@hidden>)

  • Prev by Date: mathematical area of closed vector path
  • Next by Date: Re: Networking
  • Previous by thread: Parsing NSString
  • Next by thread: Re: Parsing NSString
  • Index(es):
    • Date
    • Thread