• 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: converting NSData to string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: converting NSData to string


  • Subject: Re: converting NSData to string
  • From: "Adam R. Maxwell" <email@hidden>
  • Date: Thu, 6 Jul 2006 20:31:33 -0700


On Jul 6, 2006, at 15:50, Rex Fernando wrote:

Hello,

I have an NSData with rtf data in it. I want an NSString with the plain text of the data, no tags or images in it. I tried stringWithData:Encoding:, but couldn't get it to work. Can someone help me?

Try creating an NSAttributedString with your RTF data. [[[[NSAttributedString alloc] initWithRTFData:data documentAttributes:NULL] autorelease] string] should give you an NSString representation of the RTF (search the docs for RTF to see more).


Adam



_______________________________________________
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


References: 
 >converting NSData to string (From: Rex Fernando <email@hidden>)

  • Prev by Date: How to identify the host app is Carbon or Cocoa in a context menu plugin.
  • Next by Date: Custon toolbar items and size
  • Previous by thread: Re: converting NSData to string
  • Next by thread: Core Data: Single entity in NSDocument?
  • Index(es):
    • Date
    • Thread