basically - when i go to print out the numbers - i want to format 'foo'
with a leding zero so that it reads '05' and is aesthetically pleasing
when compared to a double-digit number - such as bar: '10'.
On Fri, Jun 01, 2007 at 01:03:26AM +0900, Cory wrote:
folks - can't quite figure this one out...
foo = 5
bar = 10
basically - when i go to print out the numbers - i want to format 'foo'
with a leding zero so that it reads '05' and is aesthetically pleasing
when compared to a double-digit number - such as bar: '10'.
essentially looking to get:
05
10
25
03
------------------------------------------------------------------------
Format---Uses _str_ as a format specification, and returns the
result of applying it to _arg_. If the format specification
contains more than one substitution, then _arg_ must be an +Array+
containing the values to be substituted. See +Kernel::sprintf+ for
details of the format string.
basically - when i go to print out the numbers - i want to
format 'foo'
with a leding zero so that it reads '05' and is aesthetically
pleasing when compared to a double-digit number - such as bar: '10'.
On 5/31/07, Cory <coryw@americanmonkey.com> wrote:
folks - can't quite figure this one out...
foo = 5
bar = 10
basically - when i go to print out the numbers - i want to format 'foo'
with a leding zero so that it reads '05' and is aesthetically pleasing
when compared to a double-digit number - such as bar: '10'.