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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to