[Zope] Substring

Martijn Faassen M.Faassen@vet.uu.nl
Wed, 11 Aug 1999 09:46:00 +0200


Anderson Ami wrote:
 
> How I get a substring ?

if 'a' is some string, and you want the first three characters:
<!--#var "a[0:3]"-->

or

<!--#var "a[:3]"-->

This is the Python 'slicing operator'. You may want to look up the
Python tutorial at www.python.org; the expressions in the 'var' tags are
Python expressions (with unfortunately a lot of convoluted stuff due to
the _ namespace bits).

> How i use a let tag ?

Haven't worked with that one myself yet. :)

Regards, and good luck,

Martijn