At 04:40 PM 9/15/00, Mark Bishop wrote:
>Is there a Lingo routine that will allow me to remove all of the spaces from
>a string?

Please don't cross post the same question to multiple lists/news groups.

One method that nobody mentioned in any of the replies to your question is 
extracting the words from the string rather than deleting the spaces:

on killSpaces inStr
   wordCount = inStr.word.count
   outStr = ""
   repeat with i = 1 to wordCount
     outStr = outStr &inStr.word[i]
   end repeat
   return outStr
end

-- Welcome to Director --
put killSpaces("remove all of the spaces ")
-- "removeallofthespaces"

This should be faster than looping through characters, but I haven't 
compared it to the 'offset' suggestion.




--
Mark A. Boyd
Keep-On-Learnin' :)


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to