LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
function NoSPaceDebEndLine pLeT
repeat until char 1 of pLeT <> " " --•• work
delete char 1 of pLeT
wait 1 milliseconds
end repeat
repeat until char-1 of pLeT <> " " --•• dont work
delete char-1 of pLeT
wait 1 milliseconds
end repeat
return pLeT
end NoSPaceDebEndLine
on mouseUp
put line 1 of fld 1 into myVar
put stripSpace (myVar) into fld 2
end mouseUp
function stripSpace theString
repeat forever
if char 1 of theString = space then
delete char 1 of theString
else
exit repeat
end if
end repeat
repeat forever
if the last char of theString = space then
delete the last char of theString
else
exit repeat
end if
end repeat
return theString
end stripSpace