Guardian Native C Library Calls Reference Manual (G06.28+, H06.04+)
wcsncpy(3) Guardian Native C Library Calls Reference Manual
NAME
wcsncpy - Copies wide-character strings with a character count
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL
G-series native OSS processes: /G/system/sysnn/zcrtlsrl
H-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
H-series OSS processes: /G/system/zdllnnn/zcrtldll
SYNOPSIS
#include <wchar.h>
wchar_t *wcsncpy(
wchar_t *wcstring1,
const wchar_t *wcstring2,
size_t number);
PARAMETERS
wcstring1 Points to a location that contains the first wide-character string.
wcstring2 Points to a location that contains the second wide-character string.
number Specifies the number of wide characters to copy.
DESCRIPTION
The wcsncat( ), wcsncmp(), and wcsncpy() functions operate on null-terminated, wide-
character strings.
The wcsncpy() function copies wide characters from the wcstring2 parameter to the wcstring1
parameter and returns wcstring1. The function copies the number of wide characters specified by
the value of the number parameter. If wcstring2 is shorter than number characters, wcstring1 is
padded out to number characters with null wide characters.
RETURN VALUES
Upon successful completion, the wcsncpy() function returns a pointer to the resulting string.
Otherwise, this function returns a null pointer.
When a successful comparison cannot be made, this function returns a value of 0 (zero).
RELATED INFORMATION
Functions: strncat(3) wcschr(3), wcscmp(3), wcscpy(3), wcscspn(3), wcsncat(3), wcsncmp(3).
7−64 Hewlett-Packard Company 527192-005