• 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: Fun with componentsSeparatedByString!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fun with componentsSeparatedByString!


  • Subject: Re: Fun with componentsSeparatedByString!
  • From: Greg Titus <email@hidden>
  • Date: Sat, 11 Jan 2003 16:03:49 -0800

On Saturday, January 11, 2003, at 03:13 PM, Carla Lewis wrote:

fileContentsByLine = [fileContents componentsSeparatedByString:@","];

Well the above line of code will not work for me because my "string
separator" is the hex codes "0D0A" not ",". How can I use the
aforementioned hex codes as a separator?

unichar c = 0x0D0A;
fileContentsByLine = [fileContents componentsSeparatedByString:[NSString stringWithCharacters:&c length:1]];

Hope this helps,
- Greg
_______________________________________________
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: 
 >Fun with componentsSeparatedByString! (From: Carla Lewis <email@hidden>)

  • Prev by Date: Syntax Coloring and NSTextStorage
  • Next by Date: Getting images from RTF
  • Previous by thread: Fun with componentsSeparatedByString!
  • Next by thread: Talking to FirstResponder
  • Index(es):
    • Date
    • Thread