HP-UX Reference (11i v1 05/09) - 3 Library Functions N-Z (vol 7)
s
strfmon(3C) strfmon(3C)
As an other example, given the locale of
en_US.roman8 and the values 123.45, -123.45 and
3456.781:
Conversion Output Comments
Specification
%n $123.45 default formatting
-$123.45
$3,456.78
%11n $123.45 right align within an 11 character field
-$123.45
$3,456.78
%#5n $ 123.45 align columns for values up to 99,999
-$ 123.45
$ 3,456.78
%=*#5n $***123.45 specify a fill character
-$***123.45
$*3,456.78
%=0#5n $000123.45 fill characters do not use grouping
-$000123.45 even if the fill character is a digit
$03,456.78
%ˆ#5n $ 123.45 disable the grouping separator
-$ 123.45
$ 3456.78
%ˆ#5.0n $ 123 round off to whole units
-$ 123
$ 3457
%ˆ#5.4n $ 123.4500 increase the precision
-$ 123.4500
$ 3456.7810
%(#5n $ 123.45 use an alternative positive/negative style
($ 123.45)
$ 3,456.78
%!(#5n 123.45 disable the currency symbol
( 123.45)
3,456.78
AUTHOR
strfmon was developed by HP.
SEE ALSO
localeconv(3C), thread_safety(5).
STANDARDS COMPLIANCE
strfmon(): XPG4
Section 3−−914 Hewlett-Packard Company − 3 − HP-UX 11i Version 1: September 2005