[Zope] Trimming a text field in a form

Wolfgang Strobl ws@mystrobl.de
Mon, 30 Jul 2001 01:05:43 +0200


On 29 Jul 2001, at 13:57, Frank Tegtmeyer wrote:

> > What did Trim() do?
> 
> trim() typically removes whitespace at the beginning and end of a
> string. I first saw it in dBase about 15 years ago, I think.

<Grin> I first saw it in SNOBOL4 (developed at Bell Telephone 
Labs, in 1962). Quoting from Griswold et al "The Snobol 4 
Programming Language, 2. ed, '71, p. 82:

"3.4.3 TRIM

TRIM is a primitive function whose argument must be a string or 
an integer. The value of TRIM is a string which is the argument 
value with all trailing blanks removed."

I still miss Snobol4's clean, but powerfull pattern match, 
sometimes. Compared to that, re is an ugly mess.

-- ws