From: Tomas Brixi Date: 2001-10-31T21:37:00+09:00 Subject: [ruby-talk:23942] Re: strange string formating Hello, I want to reformat lines as the followings: TK1000000104 , 55.25 TF1000001058 , 24 to output lines like this one TK1000000104 0055.25 this is a code snippet that does not work for me : --------------------------- parts = line.split( "," ) out = format( "%13s%04.2f", parts[0], part[1].to_f ) --------------------------- it looks like ruby does not handle %04.2f format specifier because the output line is: TK1000000104 55.25 TF1000001058 24.00 Is this the right way to do formating this way? I use ruby 1.6.5 on win32 - cygwin installer Thanks Tom