RE: silly newbie question
RE: silly newbie question
- Subject: RE: silly newbie question
- From: email@hidden
- Date: Wed, 10 Apr 2002 13:44:00 -0500
Natalie,
Here is a quick and dirty approach using the "offset" command.
There may be other more elegant ways to do it, but this one works. If you
have instances where you potentially have more than one space to deal with
you will probably need to set up some kind of repeat loop.
Source code below:
set cityName to "St. Louis"
set firstPart to characters 1 through ((the offset of " " in cityName) - 1)
in cityName as string
set newCityName to firstPart & characters -1 thru ((the offset of " " in
cityName) + 1) in cityName as string
Hope this helps!
Kevin
_______________________________________________
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.