Performs operations on a specified number of wide characters from one string to another.
Standard C Library (libc.a)
#include <wcstr.h>
wchar_t * wcsncat (WcString1, WcString2, Number)
wchar_t * WcString1;
const wchar_t * WcString2;
size_t Number;
wchar_t * wcsncmp (WcString1, WcString2, Number)
const wchar_t *WcString1, *WcString2;
size_t Number;
wchar_t * wcsncpy (WcString1, WcString2, Number)
wchar_t *WcString1;
const wchar_t *WcString2;
size_t Number;
wchar_t * wcpncpy (WcString1, WcString2, Number)
wchar_t *WcString1;
const wchar_t *WcString2;
size_t Number;
The wcsncat, wcsncmp, wcsncpy, and wcpncpy subroutines operate on null-terminated wide character strings.
The wcsncat subroutine appends characters from the WcString2 parameter, up to the value of the Number parameter, to the end of the WcString1 parameter. It appends a wchar_t null character to the result and returns the WcString1 value.
The wcsncmp subroutine compares wide characters in the WcString1 parameter, up to the value of the Number parameter, to the WcString2 parameter. It returns an integer greater than 0 if the value of the WcString1 parameter is greater than the value of the WcString2 parameter. It returns a 0 if the strings are equivalent. It returns an integer less than 0 if the value of the WcString1 parameter is less than the value of the WcString2 parameter.
The wcsncpy, and wcpncpy subroutines copies wide characters from the WcString2 parameter, up to the value of the Number parameter, to the WcString1 parameter. It returns the value of the WcString1 parameter. If the number of characters in the WcString2 parameter is less than the Number parameter, the WcString1 parameter is padded out with wchar_t null characters to a number equal to the value of the Number parameter.
If any null wide character codes is written into the destination, the wcpncpy subroutine returns the address of the first such null wide character code. Otherwise, it returns & WcString1 [Number].
Item | Description |
---|---|
WcString1 | Specifies a wide-character string. |
WcString2 | Specifies a wide-character string. |
Number | Specifies the range of characters to process. |