From: Peter Szinek Date: 2006-05-29T18:51:11+09:00 Subject: Equivalent of Python zfill? Hello all, I need a function which takes a number (x) and outputs a string which contains x zeroes. e.g. foo(3) = "000" foo(5) = "00000" etc. in Python this function is ''.zfill(5) another possibility would be 5*'0' Equivalents in Ruby? I would be mainly interested in a zfill equivalent since that is faster that join or 5* imho. Thx Peter