• 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: Using CFStringTransform with Attributed strings or runs, maintaining the styling of the Attributes in transformed results.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using CFStringTransform with Attributed strings or runs, maintaining the styling of the Attributes in transformed results.


  • Subject: Re: Using CFStringTransform with Attributed strings or runs, maintaining the styling of the Attributes in transformed results.
  • From: Douglas Davidson <email@hidden>
  • Date: Mon, 20 Apr 2009 09:51:01 -0700


On Apr 19, 2009, at 1:44 PM, John Joyce wrote:

I didn't see it in the function documentation, but
is there a way for CFStringTransform to tell me the ranges of the the transformations it has done in the returned string?!
That would certainly be nifty!

Take a look at the header comments. Notice that the range argument is actually a range pointer, and the comments specify that "on return, range is modified to reflect the new range corresponding to the original range".


As far as your original question goes, using CFStringTransform on an NSMutableAttributedString's -mutableString should do something sensible, though I can't guarantee it will do exactly what you want. Another option would be to iterate through the string by attribute ranges and act on each range individually, though of course you'll have to account for changes in length due to the transforms.

Douglas Davidson

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Using CFStringTransform with Attributed strings or runs, maintaining the styling of the Attributes in transformed results. (From: John Joyce <email@hidden>)
 >Re: Using CFStringTransform with Attributed strings or runs, maintaining the styling of the Attributes in transformed results. (From: John Joyce <email@hidden>)

  • Prev by Date: hud panel tiger
  • Next by Date: printer name via NSPrintInfo after running Page Setup
  • Previous by thread: Re: Using CFStringTransform with Attributed strings or runs, maintaining the styling of the Attributes in transformed results.
  • Next by thread: NSSavePanel and file formats
  • Index(es):
    • Date
    • Thread