Re: Finding count of a character in a string
Re: Finding count of a character in a string
- Subject: Re: Finding count of a character in a string
- From: Will Mason <email@hidden>
- Date: Mon, 22 Aug 2005 11:21:23 -0700 (PDT)
Sorry. Reposting a non-garbled version of my last message...
--- Will Mason <email@hidden> wrote:
> --- Steve Palmer <stevstevenopencommunityuk> ukote:
>
> > if you know up-front that the string is entirely ASCII, then
> getting
> >
> > a pointer to the raw string data with [UTF8UTFing:] and iterating
> > over it with a pointer might be marginally faster.
>
> This would be worse, actually, as NSStrings use UTF-16 as the
> underlying encoding, not UTF-8. You'd waste time converting from
> UTF-16 to UTF-8.
>
> Take care,
> Will
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden