Performs operations on a specified number of wide characters from one string to another.
#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;
The wcsncat, wcsncmp and wcsncpy 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 subroutine 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.
WcString1 | Specifies a wide-character string. |
WcString2 | Specifies a wide-character string. |
Number | Specifies the range of characters to process. |
These subroutines are part of Base Operating System (BOS) Runtime.
The mbsncat subroutine, mbsncmp subroutine, mbsncpy subroutine, wcscat subroutine, wcscmp subroutine, wcscpy subroutine.
National Language Support Overview for Programming, Subroutines Overview, Understanding Wide Character String Comparison Subroutines, Understanding Wide Character String Copy Subroutines in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.