[Zope] newbie question - handling strings

Dimitris Andrakakis dandraka_info@yahoo.com
Mon, 27 Mar 2000 03:48:54 +0300


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


__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com