Re: Removing leading and railing blanks
Re: Removing leading and railing blanks
- Subject: Re: Removing leading and railing blanks
- From: Kai <email@hidden>
- Date: Wed, 26 Feb 2003 01:23:23 +0000
on Tue, 25 Feb 2003 00:51:40 -0600, Jeffrey Mattox <email@hidden> wrote:
>
What's the most efficient way to remove leading and trailing blanks
>
from a string?
If by blanks you mean spaces, Jeffrey - try this:
========================================
to stripEndSpaces from t
repeat until t does not start with space
set t to t's text 2 thru -1
end repeat
repeat until t does not end with space
set t to t's text 1 thru -2
end repeat
t
end stripEndSpaces
stripEndSpaces from " date '+%B %e, %G' "
--> "date '+%B %e, %G'"
========================================
--
Kai
_______________________________________________
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.