Re: counting characters
Re: counting characters
- Subject: Re: counting characters
- From: Allan Odgaard <email@hidden>
- Date: Thu, 15 Apr 2004 21:18:13 +0200
On 15. Apr 2004, at 20:09, Jonathan E. Jackel wrote:
Of course, you can put your code in a category on NSString call it the
Cocoa
way:
int occurrences = [theString numberOfOccurrences:searchString];
Unfortunately if we need to count the characters in an
NSAttributedString instead (or perhaps count objects in an NSArray)
then we cannot re-use your implementation, which we can with
std::count.
** Cocoa FAQ: <
http://www.alastairs-place.net/cocoa/faq.txt> **
_______________________________________________
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.