man.bsd.lv manual page server

Manual Page Search Parameters

STRFMON(3) Library Functions Manual STRFMON(3)

strfmon, strfmon_lconvert monetary value to string

library “libc”

#include <monetary.h>

ssize_t
strfmon(char * restrict s, size_t maxsize, const char * restrict format, ...);

ssize_t
strfmon_l(char * restrict s, size_t maxsize, locale_t locale, const char * restrict format, ...);

The () 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.

The () function does the same as strfmon() but takes an explicit locale rather than using the current locale.

The format string is composed of zero or more directives: ordinary characters (not %), which are copied unchanged to the output stream; and conversion 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:

If the total number of resulting bytes including the terminating NUL byte is not more than maxsize, strfmon() returns the number of bytes placed into the array pointed to by s, not including the terminating NUL byte. Otherwise, -1 is returned, the contents of the array are indeterminate, and errno is set to indicate the error.

The strfmon_l() function returns the same values as strfmon().

The strfmon() and strfmon_l() functions will fail if:

[]
Conversion stopped due to lack of space in the buffer.
[]
The format string is invalid.
[]
Not enough memory for temporary buffers.

localeconv(3)

The strfmon() function conforms to IEEE Std 1003.1-2001 (“POSIX.1”). The strfmon_l() function conforms to IEEE Std 1003.1-2008 (“POSIX.1”).

The strfmon() function was implemented by Alexey Zelkin <phantom@FreeBSD.org>.

This manual page was written by Jeroen Ruigrok van der Werven <asmodai@FreeBSD.org> based on the standard's text.

The strfmon() and strfmon_l() functions do not correctly handle multibyte characters in the format argument.

December 25, 2013 DragonFly-5.6.1