• 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: exploding string into array...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: exploding string into array...


  • Subject: Re: exploding string into array...
  • From: Jens Bauer <email@hidden>
  • Date: Thu, 19 Feb 2004 21:42:29 +0100

Hi,

On Thursday, Feb 19, 2004, at 21:28 Europe/Copenhagen, email@hidden wrote:

ok so i have a string with field names in or ie "field1,field2,field3"
when i use:

NSArray *fieldsArray = [fields componentsSeparatedByString:@","];

Yes.

the resulting array has them in no particular order

They *should* be.

Did you try...

for(i = 0; i < [fieldsArray count]; i++)
{
printf("%s\n", [[fieldsArray objectAtIndex:i] cString]);
}

?

i figure it would break them into an array like:

array[0] - field1
array[1] - field2
array[2] - field3

Yep.. I've tried reading Microsoft files, and I believe that's what you're trying to do.
I found out that they leave old garbage in the files, when they overwrite them, so I gave up.
Have you tried dumping the entire file, so you can view it easily ?

but it doesn't am i doing something wrong or is there a better way to
do this i just need an array with these fields in the correct order i
would be nice not having to add them 1 at a time...

I'm pretty convinced that you could do it this way, but I (still) don't know anything about MS formats...


Love,
Jens
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: exploding string into array...
      • From: Peter Wollschlaeger <email@hidden>
References: 
 >exploding string into array... (From: email@hidden)

  • Prev by Date: Re: inserting carriage / hard returns into a string...
  • Next by Date: (no subject)
  • Previous by thread: exploding string into array...
  • Next by thread: Re: exploding string into array...
  • Index(es):
    • Date
    • Thread