IPnom Home • Manuals • FreeBSD

 FreeBSD Man Pages

Man Sections:Commands (1)System Calls (2)Library Functions (3)Device Drivers (4)File Formats (5)Miscellaneous (7)System Utilities (8)
Keyword Live Search (10 results max):
 Type in part of a command in the search box.
 


strfmon(3)

NAME

     strfmon -- convert monetary value to string


LIBRARY

     Standard C Library (libc, -lc)


SYNOPSIS

     #include <monetary.h>

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


DESCRIPTION

     The strfmon() 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 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:

     o	 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.

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

     o	 A `#' sign followed by a decimal number specifying the maximum
	 expected number of digits after the radix character.

     o	 A `.' character followed by a decimal number specifying the number
	 the number of digits after the radix character.

     o	 One of the following conversion specifiers:

	 i    The double argument is formatted as an international monetary
	      amount.

     byte.  Otherwise, -1 is returned, the contents of the array are indeter-
     minate, and errno is set to indicate the error.


ERRORS

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


STANDARDS

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


AUTHORS

     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 standards' text.


BUGS

     The strfmon() function does not correctly handle multibyte characters in
     the format argument.

FreeBSD 5.4		       October 12, 2002 		   FreeBSD 5.4

SPONSORED LINKS




Man(1) output converted with man2html , sed , awk