Re: reversing an NSString
Re: reversing an NSString
- Subject: Re: reversing an NSString
- From: Douglas Davidson <email@hidden>
- Date: Wed, 8 Dec 2004 15:49:06 -0800
On Dec 8, 2004, at 3:23 PM, Matthew wrote:
I'd like to rephrase the question: What's the most `Objective-C
approved' way to reverse an NSString? I didn't imagine this would be
such a chore.
An NSString can hold a general sequence of Unicode characters, but not
all such sequences make sense, let alone produce content that can be
displayed, or that follows the rules of the writing system from which
the characters are drawn. It's not clear exactly what you would want
from 'reversal' in general, but at a minimum I think you would not want
to reverse on a finer granularity than that given by
rangeOfComposedCharacterSequenceAtIndex:. Even that is not necessarily
going to give a graphical reversal in the general case.
Douglas Davidson
_______________________________________________
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