Re: Faulty text item delimiters
Re: Faulty text item delimiters
- Subject: Re: Faulty text item delimiters
- From: Paul Berkowitz <email@hidden>
- Date: Tue, 11 Oct 2005 00:51:27 -0700
- Thread-topic: Faulty text item delimiters
On 10/10/05 11:50 PM, "david" <email@hidden> wrote:
> set AppleScript's text item delimiters to {"."}
> tell application "iCal" to set icalVersion to version as string
> set txtItems to text items of icalVersion
> set AppleScript's text item delimiters to {""}
> set icalVersion to text 1 thru 3 of ((txtItems as string) & "0")
> {txtItems, icalVersion}
>
> --> {{"2", "0", "2"}, "202"}
>
>
> look at the following text item delimiters:
>
> set AppleScript's text item delimiters to {"/."}
> <----------------- "/."
> tell application "iCal" to set icalVersion to version as string
> set txtItems to text items of icalVersion
> set AppleScript's text item delimiters to {""}
> set icalVersion to text 1 thru 3 of ((txtItems as string) & "0")
> {txtItems, icalVersion}
>
>
> --> {{"2.0.2"}, "2.0"}
Umm, yes? The same result will occur for text item delimiters of {"\\."}, or
{"..."} or {"75"} or {"x and a half"} or {"garbage can123"} or in fact
anything other than {"."} or {"2"} or any other combination of characters
occurring in the string "2.0.2". I'm not quite sure why you're bringing up
the particular "/." rather than a million other examples that will have the
same result? Do you see some evidence of a "/" in the original? I just see a
".".
--
Paul Berkowitz
_______________________________________________
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