concatenate fields

Peter Brigham pmbrig at
Sat Jul 5 09:58:56 EDT 2008

On Jul 3, 2008, at 1:00 PM, "william humphrey" <shoreagent at>  

> Nice -- Where do I get sws tText?

Not sure what you are asking. The function handler should be placed  
sufficiently high in the message path so it is available wherever you  
might need it. Usually this will be in your mainstack stack script,  
or in a library stack script that is in use.

> On Wed, Jul 2, 2008 at 7:45 PM, Mark Wieder  
> <mwieder at> wrote:
>> Peter-
>>> If you have this utility function:
>>> function sws tText
>>>   -- strips white space (returns, spaces, tabs, etc)
>>>   -- from tText, fore & aft
>>>   return word 1 to -1 of tText
>>> end sws
>> That's also handy for stripping the comment off the end of a line  
>> from a
>> script...

I don't see how that would work. Trying

put sws("on sws tText  -- strips white space    ")

gives me

"on sws tText  -- strips white space"

since the last word of the string is "space". AFAICS, this function  
will never strip anything but white space.

Peter M. Brigham
pmbrig at

More information about the use-livecode mailing list