• 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: getting chunks of text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting chunks of text


  • Subject: Re: getting chunks of text
  • From: David Marshall <email@hidden>
  • Date: Thu, 17 Mar 2005 22:21:23 -0500

Not sure if I missed something, but it seems to me that in order to distinguish between a chunk whose 256th character is in the middle of a word and one whose 256th character is the last letter of a word, it's actually necessary to look at the 257th character.

In cases in which the chunk ends with the end of a word, some of the routines we've seen would appear to disqualify that last word, since its terminating white space occurs at the beginning of the second chunk. But the second chunk would begin, as specified, with the 257th character. Hence in the rejoining of chunks one and two, the chunk-terminating word of chunk one would be lost.

Does this solution make sense?

set inputText to characters 1 through 257 of --your text input method here
if ((item -1 of inputText = " ") or (item -2 of inputText = " ")) then --checking for either condition
return items 1 through 256 of inputText as string


Sorry if I missed discussion of this issue.

- - - - -

David Marshall
email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: iCal organization with dates & events & lists....
  • Next by Date: Image event scripting
  • Previous by thread: Re: getting chunks of text
  • Next by thread: Re: getting chunks of text
  • Index(es):
    • Date
    • Thread