aligned numbers aka zerofill

# zerofill(7,3) => "007"
def zerofill(value, digits = 9)
"%0#{digits}d" % value.to_i
end



Leave a Reply

Formatting: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>