Sarah Reichelt wrote:

Hi Peter,

I use an alternative trim function that operates faster and removes excess space between words as well as at the start & end:

function trim pText
  put empty into tNew
  repeat for each word w in pText
    put w & space after tNew
  end repeat
  delete last char of tNew
  return tNew
end trim

Or, if you don't need the internal clean-up, you can just do

function trimmed theText
  return word 1 to -1 of theText
end trimmed

which is just about simple enough to not use a function at all, and write it in-line when you need it.

--
Alex Tweedly       http://www.tweedly.net



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.8.4 - Release Date: 27/03/2005

_______________________________________________
use-revolution mailing list
[email protected]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to