ifx_gl_wcsncpy - copy part of a wide-character string
SYNOPSIS
#include <ifxgls.h>
int ifx_gl_wcsncpy(gl_wchar_t *wcs1, gl_wchar_t *wcs2, int wcs2_char_length, int char_limit)
DESCRIPTION
This function copies wcs2 to the
location pointed to by wcs1. No more than char_limit
characters will be read from wcs2 and written to wcs1.
If wcs1 and wcs2
overlap, the results of this function are undefined.
If wcs2_char_length is the value IFX_GL_NULL then the function will
assume that wcs2 is a null-terminated string;
otherwise the function assumes that wcs2_char_length is the
number of characters in wcs2.
See Wide-Character String Termination
for more general information about wcs2_char_length.
RETURN VALUE
This function returns the number of characters in the resulting copied string,
not including the null terminator, if any.
ERRORS
If an error has occurred, this function returns -1 and sets
ifx_gl_lc_errno()
to one of the following,
- [IFX_GL_PARAMERR]
- wcs2_char_length is not equal to IFX_GL_NULL and is not greater than or equal to zero.
SEE ALSO
ifx_gl_wcscpy()
ifx_gl_mbscpy()
ifx_gl_mbsncpy()
ACKNOWLEDGEMENT
Portions of this description were derived from the X/Open CAE
Specification: "System Interfaces and Headers, Issue 4"; X/Open
Document Number: C202; ISBN: 1-872630-47-2; Published by X/Open Company