[Zope] newbie question - handling strings

Andres Corrada andres@corrada.com
Sun, 26 Mar 2000 22:34:01 -0500


Dimitris Andrakakis wrote:
> 
> Hi there,
> I've got an 8-character string, say str='12345678'. With
> <dtml-var str> ofcourse I get 12345678.
> How can I display only part of it ? Say the first 4 chars
> (1234) or the next 2 (56) or the last two (78).
> In python I know this can be done with something like
> str[:4], str[4:6] and str[6:].
> Any help ? (Hope I didn't sound too newbish !).
> ---
> Dimitris Andrakakis
> http://atlas.central.ntua.gr:8000/~mc94068

<dtml-var "str[:4]"> or whatever else you want should work.

------------------------------------------------------
Andres Corrada-Emmanuel   Email: andres@corrada.com
Owner                     http://www.corrada.com/mamey
Mamey                     Phone: (413) 587-9595
------------------------------------------------------