[Zope] string n times

Kevin Dangoor kid@kendermedia.com
Tue, 25 Apr 2000 10:12:18 -0400


----- Original Message ----- 
From: "Jorge Magalhaes" <root@predict.telepac.pt>
To: <zope@zope.org>
Sent: Tuesday, April 25, 2000 9:47 AM
Subject: [Zope] string n times


> How i can repeat a string n times.  For example in  perl i can do:
> 
>             "*" x $score  ($score is a integer)
> 
> and if $score=10 i have ********** . 

In python, you can just do '*' * score
(The standard multiplication operator works with strings).

In DTML, you can do <dtml-var "'*' * score">

Kevin