Manual Pages for UNIX Darwin command on man strfmon_l
MyWebUniversity

Manual Pages for UNIX Darwin command on man strfmon_l

STRFMON(3) BSD Library Functions Manual STRFMON(3)

NAME

ssttrrffmmoonn, ssttrrffmmoonnll - convert monetary value to string

LLIIBBRRAARRYY

Standard C Library (libc, -lc)

SYNOPSIS

##iinncclluuddee <>

ssizet ssttrrffmmoonn(char * s, sizet maxsize, const char *format, ...);

##iinncclluuddee <>

ssizet ssttrrffmmoonnll(char * s, sizet maxsize, localet loc, const char *format, ...);

DESCRIPTION

The ssttrrffmmoonn() function places characters into the array pointed to by s as controlled by the string pointed to by format. No more than maxsize bytes are placed into the array. While the ssttrrffmmoonn() function uses the current locale, the ssttrrffmmoonnll()

function may be passed a locale directly. See xlocale(3) for more infor-

mation.

The format string is composed of zero or more directives: ordinary char-

acters (not %%), which are copied unchanged to the output stream; and con-

version specifications, each of which results in fetching zero or more subsequent arguments. Each conversion specification is introduced by the

%% character. After the %%, the following appear in sequence:

++oo Zero or more of the following flags: ==f A `==' character followed by another character f which is used as the numeric fill character. ^^ Do not use grouping characters, regardless of the current locale default. ++ Represent positive values by prefixing them with a positive sign, and negative values by prefixing them with a negative sign. This is the default. (( Enclose negative values in parentheses. !! Do not include a currency symbol in the output.

- Left justify the result. Only valid when a field width is spec-

ified. ++oo An optional minimum field width as a decimal number. By default, there is no minimum width.

++oo A `##' sign followed by a decimal number specifying the maximum

expected number of digits after the radix character. ++oo A `..' character followed by a decimal number specifying the number the number of digits after the radix character. ++oo One of the following conversion specifiers: ii The double argument is formatted as an international monetary amount. nn The double argument is formatted as a national monetary amount.

%% A `%' character is written.

RETURN VALUES

If the total number of resulting bytes including the terminating NULL byte is not more than maxsize, ssttrrffmmoonn() returns the number of bytes placed into the array pointed to by s, not including the terminating NULL

byte. Otherwise, -1 is returned, the contents of the array are indeter-

minate, and errno is set to indicate the error. EERRRROORRSS The ssttrrffmmoonn() function will fail if: [E2BIG] Conversion stopped due to lack of space in the buffer. [EINVAL] The format string is invalid. [ENOMEM] Not enough memory for temporary buffers.

SEE ALSO

localeconv(3), xlocale(3) STANDARDS

The ssttrrffmmoonn() function conforms to IEEE Std 1003.1-2001 (``POSIX.1'').

AUTHORS The ssttrrffmmoonn() function was implemented by Alexey Zelkin . This manual page was written by Jeroen Ruigrok van der Werven based on the standards' text.

BUGS

The ssttrrffmmoonn() function does not correctly handle multibyte characters in the format argument. BSD October 12, 2002 BSD




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™