Re: replaceFirstOccurenceOf?
Re: replaceFirstOccurenceOf?
- Subject: Re: replaceFirstOccurenceOf?
- From: Gus Mueller <email@hidden>
- Date: Fri, 1 Aug 2003 08:46:30 -0700
Michael Hanna (email@hidden) wrote:
>
I've been looking through the classes for something that will let me
>
replace the first occurence of a substring in an NSMutableString.
>
>
NSMutableString:replaceOccurrencesOfString:
>
>
is close but I don't want to replace all, just the FIRST occurence. Any
>
suggestions?
Maybe combine replaceOccurrencesOfString:withString:options:range:
with rangeOfString: ?
Get the range of the first occurrence, and then use that range in
replaceOccurrencesOfString:withString:options:range:
-gus
--
August Mueller
http://flyingmeat.com/
VoodooPad - 1st Place U.S., Second O'Reilly Mac OS X Innovaters Contest
"Christmas means carnage!" -- Ferdinand, the duck
_______________________________________________
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.