Re: XML-/HTML-safe formatted output from NSString
Re: XML-/HTML-safe formatted output from NSString
- Subject: Re: XML-/HTML-safe formatted output from NSString
- From: Donald Brown <email@hidden>
- Date: Wed, 30 Oct 2002 03:37:36 -0600
Be warned--this call is Jaguar specific, so will cause errors under 10.1.
But it's not hard to duplicate:
NSRange rRange = [mymutable rangeOfString:searchstr];
While (rRange.length>0)
{
[mymutable replaceCharactersInRange:rRange withString:replacestr];
rRange = [mymutable rangeOfString:searchstr];
}
on 10/29/02 9:19 PM, Chris Hanson at email@hidden wrote:
>
At 12:07 AM +0000 10/30/02, Terence Goggin wrote:
>
> Does anyone have any thoughts on easiest ways to accomplish this? I
>
> could go through the NSString one character at a time and just
>
> replace as needed, but I was hoping there was already code or
>
> methods to do this available somewhere.
>
>
See -[NSMutableString replaceOccurrencesOfString:withString:options:range:].
>
>
Cocoa Browser is everyone's friend. :)
>
>
-- Chris
--
Donald Brown
email@hidden
http://www.eamontales.com
We have met the enemy and he is us - Pogo
_______________________________________________
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.