Re: Removing leading and railing blanks
Re: Removing leading and railing blanks
- Subject: Re: Removing leading and railing blanks
- From: Jeffrey Mattox <email@hidden>
- Date: Tue, 25 Feb 2003 02:46:30 -0600
At 11:04 PM -0800 2/24/03, Michael Terry wrote:
On 2/24/03 10:51 PM, "Jeffrey Mattox" <email@hidden> wrote:
What's the most efficient way to remove leading and trailing blanks
from a string?
set AppleScript's text item delimiters to space
words of theString as string
Well, it has to work with arbitrary strings. That removes leading
and trailing spaces, but it also mangles some strings. To wit:
set theString to " date '+%B %e, %G' "
set AppleScript's text item delimiters to space
words of theString as string
-- "date + % B % e % G"
Jeff
_______________________________________________
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.