Re: can I do this better?
Re: can I do this better?
- Subject: Re: can I do this better?
- From: Jon Pugh <email@hidden>
- Date: Sat, 15 Jun 2002 09:30:12 -0700
At 7:25 AM -0700 6/15/02, Bill Hoffman wrote:
>
set tString to "Here's what i say to that: are you sure this will work in _ALL_ ****ing cases correctly?? "
>
>
set TID to AppleScript's text item delimiters
>
set AppleScript's text item delimiters to space
>
set tString to words 1 thru -1 of tString as string
>
set AppleScript's text item delimiters to TID
>
tString
OK, I'll give you that. ;)
If you want a list, leave off the "as string". If you want the string as it was, you'll need to set the tids to space so that spaces get put in during the coercion to string. Otherwise it just mashes the words together.
It all depends on what you want, especially since this is a pretty useless example. Now, change the -1 to -2 and it will strip off the last word. Which is, I believe, how we got into this situation in the first place.
Jon
_______________________________________________
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.