HELPLIB.HLB  —  CRTL  swprintf
    Writes output to an array of wide characters under control of the
    wide-character format string.

    Format

      #include  <wchar.h>

      int swprintf  (wchar_t *s, size_t n, const wchar_t
                    *format, . . . );

1  –  Arguments

 s

    A pointer to the resulting wide-character sequence.

 n

    The maximum number of wide characters that can be written to
    an array pointed to by s, including a terminating null wide
    character.

 format

    A pointer to a wide-character string containing the format
    specifications.

  . . .

    Optional expressions whose resultant types correspond to
    conversion specifications given in the format specification.

    If no conversion specifications are given, the output sources can
    be omitted. Otherwise, the function calls must have exactly as
    many output sources as there are conversion specifications, and
    the conversion specifications must match the types of the output
    sources.

    Conversion specifications are matched to output sources in left-
    to-right order. Excess output pointers, if any, are ignored.

2  –  Description

    The swprintf function is equivalent to the fwprintf function,
    except that the first argument specifies an array of wide
    characters instead of a stream.

    No more than n wide characters are written, including a
    terminating null wide character, which is always added (unless
    n is 0).

    See also fwprintf.

3  –  Return Values

    x                  The number of wide characters written, not
                       counting the terminating null wide character.
    Negative value     Indicates an error. Either n or more wide
                       characters were requested to be written, or a
                       conversion error occurred, in which case errno
                       is set to EILSEQ.
Close Help