Re: Efficiently getting characters
Re: Efficiently getting characters
- Subject: Re: Efficiently getting characters
- From: Nir Soffer <email@hidden>
- Date: Wed, 3 May 2006 10:07:46 +0300
On 03/05/2006, at 02:01, Douglas Davidson wrote:
to get characters from a long string. Unfortunately, there is a note
in the documentation that says
The abstract implementation of this method uses
characterAtIndex: repeatedly,
correctly extracting the characters, though very inefficiently.
Subclasses should
override it to provide a fast implementation.
but there is no indication how to do it efficiently (or why NSString
didn't bother to do it efficiently in the first place)
This note is intended for those who are writing subclasses of
NSString. If you are not writing a subclass of NSString, you should
ignore it. If you are not writing a subclass of NSString, you are not
using the abstract implementation of getCharacters:range:. Instead,
you are using an efficient implementation supplied by one of the
standard concrete subclasses.
The documentation must be fixed to make this clear.
Best Regards,
Nir Soffer
_______________________________________________
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