Version franaise
Home About Download Resources Contact us
Browse thread
precision not working properly for strings in Printf?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Quc_Peyrot <chojin@l...>
Subject: precision not working properly for strings in Printf?
It seems that the precision field doesn't work properly with the "s"  
type in Printf.printf:

# Printf.printf "%.2s" "qwerty";;
qwerty- : unit = ()

This should print "qw"

-- 
Best Regards,
Quc