Re: Clever way to replace in a NSString
Re: Clever way to replace in a NSString
- Subject: Re: Clever way to replace in a NSString
- From: "Mathieu Godart" <email@hidden>
- Date: Mon, 29 Mar 2004 16:39:18 +0200
>
As Joar said, you can do this with NSMutableString. Please read the
>
documentation:
>
<http://developer.apple.com/documentation/Cocoa/Reference/Foundation/
>
ObjC_classic/Classes/NSMutableString.html>
Yes, it's exactly what I needed. How silly I am: how could I forgot the
mutable one...
>
> 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.
>
>
There is; use -lossyCString in NSString. That doesn't return an
>
NSString, but you can use the result to make a new one...
Good idea!
>
> One laste thing, is it possible to extract a substring matching a reg
>
> exp?
>
>
Not with Foundation, but there are three third-party frameworks that
>
support regular expressions: AGRegex, MOKit, and OmniFoundation.
>
>
This is a rather frequently asked question, so I will now direct you to
>
the archives: <http://cocoa.mamasam.com/>
Yeah, I understand that. I'm gonna look at this OmniFundation: at least, I'm
shure this is clean code!
Thanks a lot,
Mathieu Godart
_______________________________________________
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.