VMS Help  —  CRTL  wcsncpy
    Copies wide characters from source into dest. The function copies
    up to a maximum of maxchar characters.

    Format

      #include  <wchar.h>

      wchar_t *wcsncpy  (wchar_t *dest, const wchar_t *source, size_t
                        maxchar);

1  –  Function Variants

    The wcsncpy function has variants named _wcsncpy32 and _wcsncpy64
    for use with 32-bit and 64-bit pointer sizes, respectively.

2  –  Arguments

 dest

    Pointer to the null-terminated wide-character destination string.

 source

    Pointer to the null-terminated wide-character source string.

 maxchar

    The maximum number of wide characters to copy from source to
    dest.

3  –  Description

    The wcsncpy function copies no more than maxchar characters from
    source to dest. If source contains less than maxchar characters,
    null characters are added to dest until maxchar characters have
    been written to dest.

    If source contains maxchar or more characters, as many characters
    as possible are copied to dest. The null terminator of source is
    not copied to dest.

    See also wcscpy.

4  –  Return Value

    x                  The address of dest.
Close Help