P
Peter Szinek
Hello all,
I am wondering if I have just found a bug in (s)printf...
According to the PickAxe, table "sprintf flag characters":
================= snip ==================================
0 (zero) all Pad with zeros, not spaces.
================= snip ==================================
so I think this call
irb(main):053:0> sprintf("%05s", 123)
=> " 123"
should correctly result in
"00123"
or I am getting something wrong?
thanks,
Peter
__
http://www.rubyrailways.com
I am wondering if I have just found a bug in (s)printf...
According to the PickAxe, table "sprintf flag characters":
================= snip ==================================
0 (zero) all Pad with zeros, not spaces.
================= snip ==================================
so I think this call
irb(main):053:0> sprintf("%05s", 123)
=> " 123"
should correctly result in
"00123"
or I am getting something wrong?
thanks,
Peter
__
http://www.rubyrailways.com