Re: stripping an extra character from a text item
Re: stripping an extra character from a text item
- Subject: Re: stripping an extra character from a text item
- From: "Mark Martin" <email@hidden>
- Date: Tue, 18 Dec 2001 17:09:56 -0500
Try this for stripping unwanted characters:
on Trim(cString)
set WhiteChars to " "
set Trimmed to false
repeat until trimmed
if character -1 of cString is contained in WhiteChars then
set cString to characters 1 thru -2 of cString as text
else
set Trimmed to true
end if
end repeat
return cString
end Trim
Mark Martin
The John Henry Company
Lansing, MI
USA