Clever way to replace in a NSString
Clever way to replace in a NSString
- Subject: Clever way to replace in a NSString
- From: "Mathieu Godart" <email@hidden>
- Date: Mon, 29 Mar 2004 15:30:34 +0200
Hi all,
I'm wondering if there is an easy and efficient way to replace a specific
character by an other in a NSString (let's say I want to replace all spaces
by '+' char).
I'm more a C programer than Cocoa developper (for the moment ;-) ), for that
reason, the best way I can see is converting the string in C and manipulate
it with my good old C functions. But I think Cocoa might have some functions
(or methods) that directly replace charaters in a string.
The second funny thing I want to do with NSString is to relace all
characters with accents ('i', 'h', 'o', 'g', etc.) by their equivalent
without accent ('e, 'e', 'i', 'c', etc.). OK, I could do that manualy, but
those functions exist in PHP, for instance, and I cannot belive that Cocoa
doesn't have high level functions (or methods) to do that directly.
One laste thing, is it possible to extract a substring matching a reg exp?
Thanks,
Mathieu Godart
PS: Okay, it's true, I'm a newbie in string manipulation...
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.