From: Marc Heiler Date: 2009-04-22T19:52:18+09:00 Subject: Re: convert 7 in 07 counter = 1; sprintf("%02d", counter) # => "01" In general, the ruby String class is much better than Int class - because Strings are like everywhere in ruby. I believe Matz once said that the String class was most work (or devoured most manhours when he worked on ruby initially) -- Posted via http://www.ruby-forum.com/.