On Apr 19, 2009, at 1:42 PM, John Joyce wrote:
Currently, I'm using CFStringTransform to convert Java-based strings files (JBoss .properties files) to something human-readable for verification.Works brilliantly. Luckily, these files are short and this function is super fast.This enables me to naively take all the text of a file provided or copied and pasted and convert it whole in one pass.My question is, will this function handle AttributedStrings? Presumably not.Is there a lazy way to handle this ?(since this function is super good about recognizing and transforming only string ranges that it targets) or is it going to require me coming up with an equivalently clever way of determining the ranges of attribute runs to make this practical??
You can try creating an NSMutableAttributedString and then calling CFStringTransform on its -mutableString. Some CF functions (e.g. CFStringTrimWhitespace) screw up the attributes when you do this, but it's worth a try.
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ 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