• 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: Item delimiters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Item delimiters


  • Subject: Re: Item delimiters
  • From: Michelle Steiner <email@hidden>
  • Date: Fri, 30 May 2003 08:37:57 -0700

On Friday, May 30, 2003, at 05:52 AM, Marcus Rodrigues wrote:

Sorry about the newbie question, but: What are Item Delimiters? What they do?

I assume that you mean text item delimiters. The separate text (or a string) into components. The default text item delimiter is a null (i.e., "") which makes text items to be characters. So, for instance the text items of "Hello" are "H", "e" "l" "l" and "o".

If you change the text item delimiter to anything else, the text items will be substrings between the delimiters. For instance if the text item delimiter is a space, then the text items will be (in general) the words of the string. E.g, the text items of "Hi there my friend" would be "Hi" "there" "my" and "friend" if the text item delimiter is a space.

If the text item delimiter is the letter e, then the text items of "Hi there my friend" would be "Hi th" "r" " my fri" and "nd".

If the text item delimiter were the letter i, then the text items of "Hi there my friend" would be "H" " there my fr" and "end".

When a script asks for text items of a string, the result is a list of the text items; for example, the result from the previous paragraph would be {"H", " there my fr", "end"}.

The reason the term is text item delimiters rather than text item delimiter is that the specification allows for multiple delimiters, specified in a list; e.g.:

set text item delimiters to {",", ".", ":", ";", "!", "?"}

However, Applescript's implementation uses only the first item of the list, and ignores the rest; therefore, in practice, there can be only one text item delimiter at a time.

--Michelle

--
Never play strip Tarot.
_______________________________________________
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.

  • Follow-Ups:
    • Re: Item delimiters
      • From: John W Baxter <email@hidden>
References: 
 >Item delimiters (From: Marcus Rodrigues <email@hidden>)

  • Prev by Date: Re: Getting an app's identifier
  • Next by Date: re: dead (was Re: Faster List Checking)
  • Previous by thread: Item delimiters
  • Next by thread: Re: Item delimiters
  • Index(es):
    • Date
    • Thread