Browse thread
sprintf-Bug?
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Jonathan Roewen <jonathan.roewen@g...> |
| Subject: | Re: [Caml-list] sprintf-Bug? |
No. Padding for strings only adds spaces. It's the design. You can check the manual if you want. Padding with zeroes applies solely to numerical conversions. On 2/4/07, Oliver Bandel <oliver@first.in-berlin.de> wrote: > On Sat, Feb 03, 2007 at 06:00:37PM -0800, Robert Roessler wrote: > > Oliver Bandel wrote: > > >... > > >Or how to make hex-output with filling '0' instead > > >of ' ' for two-char length strings? > > > > > >Would a "%00X" work?! > > > > Nope, just use "%02X". > [...] > > > Oh, cool. > > I thought I had already tried it and it didn't worked. > But I just tried it at my Mac and it did work this way. > > I will try this again on the Sun next week, where I > thought that I already tried it and it didn't worked... > > ( ...but maybe I was tired only ;-) and typed something stupid ;-) ) > > > But why didn't worked the code with the two sprintf's?! > The outer sprintf should have do what I was looking for?! > > Thanks, > Oliver > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs >