• 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
replacing control characters in a NSMutableString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

replacing control characters in a NSMutableString


  • Subject: replacing control characters in a NSMutableString
  • From: email@hidden
  • Date: Fri, 3 Feb 2006 20:01:03 -0800

I'm writing a category on NSDictionary that will take an NSString of JSON information and produce a dictionary. Strings in JSON are double- quote-delimited, but will contain escaped characters. Currently, I just end up reading them in, so I end up with with this:

input: "\"this is\n a quoted string\""
i parse into: \"this is\n a quoted string\"
what I want is: "this is
 a quoted string"

Is there any way to take my NSString/NSMutableString - which has the \-escaped sequences in it such as \n, \\, \", etc. and replace those with the appropriate values?

Thanks,
Blake
_______________________________________________
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: replacing control characters in a NSMutableString
      • From: David Kennedy <email@hidden>
  • Prev by Date: Re: ceil woes
  • Next by Date: Re: Unix program wrapper problem
  • Previous by thread: Re: Can't create NSBitmapImageRep for CMYK planar data?
  • Next by thread: Re: replacing control characters in a NSMutableString
  • Index(es):
    • Date
    • Thread