Master Ruby/Rails Programming
Notes to self
Thursday, May 8, 2008
Padding numbers
If you want output as 123.90:
sprintf("%0.2f","123.9")
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Blog Archive
►
2010
(2)
►
April
(1)
►
March
(1)
►
2009
(6)
►
September
(2)
►
March
(1)
►
February
(2)
►
January
(1)
▼
2008
(51)
►
December
(1)
►
November
(2)
►
October
(2)
►
September
(3)
►
August
(1)
►
July
(2)
►
June
(2)
▼
May
(3)
Padding numbers
File.new
DangerousAttributeError
►
April
(3)
►
March
(12)
►
February
(12)
►
January
(8)
No comments:
Post a Comment