• 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: data->array (!@%$*)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: data->array (!@%$*)


  • Subject: Re: data->array (!@%$*)
  • From: Mathieu Labrie <email@hidden>
  • Date: Fri, 14 Jun 2002 16:46:53 -0400

Oh yeah thanks! I think it will do the job perfectly (I just read the doc but I'll write it later).

btw how did you knew I spoke french?
hehehe was it recognizable by my way of writing? :o)

Le vendredi 14 juin 2002, ` 04:31 PM, Sherm Pendley a icrit :

On Friday, June 14, 2002, at 02:14 PM, Mathieu Labrie wrote:

I have a problem with NSData values and NSArray ones. I'm retrieving data from a socket but then I have to store the different strings contained in the data into an array to use them later in my application. I tried to write the data into a file but it's not the same encoding as NSArray and I simply can't get my string values with the normal "arrayWithContentsOfFile:" thing..

If you're splitting the data into an array of strings that are separated by a known character, for example lines of text separated by carriage returns/linefeeds, or fields within a line separated by tab characters, you could create a string containing the data using the NSString class' initWithData:encoding: method, then split the resulting string into an array with the componentsSeparatedByString: method.

P.S Sorry for the spelling or syntax error but english is not my main language :o)

Your English is much better than my French! My own main languages are Perl and Objective-C, with English a rather distant third. ;-)

sherm--

Never put off until tomorrow what you can do today. There might be a law against it by that time.


Mathieu Labrie

personnel: email@hidden
infoteqc: email@hidden
tout usage: email@hidden
_______________________________________________
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.

References: 
 >Re: data->array (!@%$*) (From: Sherm Pendley <email@hidden>)

  • Prev by Date: Re: data->array (!@%$*)
  • Next by Date: Re: NSMenuItem setImage:
  • Previous by thread: Re: data->array (!@%$*)
  • Next by thread: Re: data->array (!@%$*)
  • Index(es):
    • Date
    • Thread