• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Clever way to replace in a NSString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Clever way to replace in a NSString (From: "Mathieu Godart" <email@hidden>)
 >Re: Clever way to replace in a NSString (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: Clever way to replace in a NSString
  • Next by Date: Decoding HTML Entities
  • Previous by thread: Re: Clever way to replace in a NSString
  • Next by thread: Re: Clever way to replace in a NSString
  • Index(es):
    • Date
    • Thread