Re: silly newbie question #42
Re: silly newbie question #42
- Subject: Re: silly newbie question #42
- From: Peter Matthias Noordzij <email@hidden>
- Date: Wed, 10 Apr 2002 22:57:08 +0200
02/04/10 17:47, Natalie Lambert wrote:
>
set cityName as "St Louis"
>
--find space, remove space
>
set result as newCityName
>
>
help?
--begin script
removeSpace("St Louis")
on removeSpace(TestWord)
set theResult to ""
repeat with i from 1 to the number of characters of TestWord
if (ASCII number (character i of TestWord)) 32 then
set theResult to theResult & character i of TestWord
end if
end repeat
return theResult
end removeSpace
--end script
Actually, the script does search look for spaces. It tests the ASCII
value of each character, and if it is 32 (space character) it will be
discarded.
Matthias
* * *
Peter Matthias Noordzij Waaldijk 77 5327 AB Hurwenen
_______________________________________________
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.