[Zope] string n times

Jim Sanford jsanford@atinucleus.com
Tue, 25 Apr 2000 09:24:35 -0500


If score is equal to 8 then <dtml-var "'*' * score"> will give you ********

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



Hi:

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 ********** .

I tried use it for make histograms.

For example:

Student_ID Score
------------------------------------------
1030 *****************
1031 *******************
1032 ************
1033 ************************
__________________________________________
Mean ****************
-------------------------------------------

--
+----------------------------------------------------------------------+
| Jorge Magalhães                 Email:     jmagalhaes@eng.uminho.pt  |
| Quinta do Calvário, bloco 14    Telemóvel: 966172200                 |
| 2º Direito Trás                 Fax:       + 351 253 516007          |
| 5400 Chaves                     Phone:     + 351 276 333008          |
| Portugal                        Email:     jorgemagalhaes@clix.pt    |
+----------------------------------------------------------------------+


_______________________________________________
Zope maillist  -  Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )