• 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: offset with spaces confusion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: offset with spaces confusion


  • Subject: Re: offset with spaces confusion
  • From: email@hidden
  • Date: Fri, 3 May 2002 16:36:23 +0100

>> ignoring white space
>> "abc" is in "a b c d"
> > -->true

>> I get the answer I expected. So why don't I get the answer I expect with
>> offset:

>> ignoring white space
>> offset of "c" in "a b c d"
>> -->8

> I'm not sure what answer you want. 4?
Er, no. 3. 'c' is the third letter ignoring white space.

>> I assume this means offset ignores the ignoring statement. Is there a
>> logical reason or is this a bug?


> While I'm not sure about the usefulness of finding an offset while
>ignoring whitespace

It cropped up this morning. I am working on a script that creates price
lists. In one bit of fiddling, if the word "New" appears in the
description, then I have to change the colour of it. Simple, but some of
the product styles include "Newark", "Newport" and "Newton" to name a few.
Which all contain "New" and produce the wrong effect. Because the word
"New" can appear anywhere, I can't look for "<space>new<space>" so I was
looking in to other ways of doing it. That's when I noticed this.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Finder Whose by Modification date
  • Next by Date: Re: initializing loaded scripts
  • Previous by thread: Re: offset with spaces confusion
  • Next by thread: Re: offset with spaces confusion
  • Index(es):
    • Date
    • Thread