• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Of course I forgot some NSTextFinder questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Of course I forgot some NSTextFinder questions


  • Subject: Re: Of course I forgot some NSTextFinder questions
  • From: Quincey Morris <email@hidden>
  • Date: Mon, 20 Mar 2017 10:41:38 -0700

On Mar 20, 2017, at 04:58 , Daryle Walker <email@hidden> 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 (email@hidden)

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:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Of course I forgot some NSTextFinder questions
      • From: Daryle Walker <email@hidden>
References: 
 >Of course I forgot some NSTextFinder questions (From: Daryle Walker <email@hidden>)

  • Prev by Date: Of course I forgot some NSTextFinder questions
  • Next by Date: Re: NSTextFinder guide
  • Previous by thread: Of course I forgot some NSTextFinder questions
  • Next by thread: Re: Of course I forgot some NSTextFinder questions
  • Index(es):
    • Date
    • Thread