From: "Peña, Botp" Date: 2006-05-29T19:13:59+09:00 Subject: Re: Equivalent of Python zfill? fr Peter: # 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. same here. irb(main):043:0> '0'*5 => "00000" irb(main):044:0> '0'*3 => "000"