| STRFMON(3) | Library Functions Manual | STRFMON(3) | 
strfmon —
#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
    loc, const char *
    restrict format,
    ...);
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 strfmon_l() function behaves the same
    as strfmon(), but uses the locale
    loc instead of the process global 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:
=f=’ character followed by
          another character f which is used as the numeric
          fill character.^+(!-#’ sign followed by a decimal
      number specifying the maximum expected number of digits before the radix
      character. When this option is used, values that do not exceed the
      specified number of digits are formatted so they will be correctly aligned
      with other values printed using the same format. This includes always
      leaving space for a possible sign indicator, even if none is needed for a
      particular value..’ character followed by a
      decimal number specifying the number of digits after the radix
    character.NULL byte is not more than
  maxsize, strfmon() 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 indeterminate, and
  errno is set to indicate the error.
strfmon() function will fail if:
strfmon() function conforms to IEEE
  Std 1003.1-2001 (“POSIX.1”).
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.
strfmon() function does not correctly handle
  multibyte characters in the format argument.
| December 7, 2017 | NetBSD 9.3 |