Re: Cocoa equivalent of CFStringTransform()
Re: Cocoa equivalent of CFStringTransform()
- Subject: Re: Cocoa equivalent of CFStringTransform()
- From: John Joyce <email@hidden>
- Date: Fri, 29 Mar 2013 14:38:29 +0900
>
>> I am not able to locate one, but is there still no Cocoa method like CFStringTransform() ?
>> I seem to recall there being one now, but it may be a simple NSString Category I wrote that I am thinking of.
>
> You can just call CFStringTransform on an NSMutableString by casting it to a CFMutableStringRef.
> Not every CF function has an NS equivalent.
>
> —Jens
Yep, I have that down pat. I have an NSString Category I wrote some time back that just wraps CFStringTransform so I wouldn't need to look up all the ICU transforms again, but I seem to recall that there was something more provided now. Perhaps it was a dream.
My wrapper is very simple and is itself wrapped by other convenience methods.
- (NSString*)stringByTransformingInRange:(NSRange)aRange withTransformation:(NSString*)transformation inReverse:(BOOL)inReverse;
(done on a mutable copy to avoid in-place side effects, returning a new string)
_______________________________________________
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