On Mar 20, 2017, at 04:58 , Daryle Walker <dary...@mac.com> wrote:
> 
>> If all the strings were concatenated together would be the ‘x’ in "fox”.

> Is there a off-by-one bug with the end of the second string? Or am I really 
> misunderstanding Apple’s counting strategy? The second string seems to be 
> only 9 characters long. And shouldn't index 18 point to the first character 
> of the third string instead?

There’s clearly an omission in that sentence in the documentation, and it 
appears to mean to say: If all the strings were concatenated together, the 18th 
character would be the ‘x’ in “fox”.

Looking at the example concatenation in the next paragraph, it appears that the 
expectation is that the “conceptually concatenated string” has spaces inserted 
between the substrings, and that would account for the extra character in the 
“fox” text. My guess is that putting conceptual spaces in the conceptual 
concatenation has something to do with the proper recognition of word 
boundaries (in some languages), but it’s not clear how that works in practice.

A bug report would probably be appropriate.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to