Performs operations on wide-character strings.
Standard C Library (libc.a)
#include <string.h>
wchar_t * wcscat(WcString1, WcString2)
wchar_t * WcString1;
const wchar_t * WcString2;
wchar_t * wcschr(WcString, WideCharacter)
const wchar_t *WcString;
wchar_t WideCharacter;
int * wcscmp (WcString1, WcString2)
const wchar_t *WcString1, *WcString2;
wchar_t * wcscpy(WcString1, WcString2)
wchar_t *WcString1;
const wchar_t
*
WcString2;
wchar_t * wcpcpy(WcString1, WcString2)
wchar_t *WcString1;
const wchar_t *WcString2;
size_t wcscspn(WcString1, WcString2)
const wchar_t *WcString1, *WcString2;
The wcscat, wcschr, wcscmp, wcscpy, wcpcpy, or wcscspn subroutine operates on null-terminated wchar_t strings. These subroutines expect the string arguments to contain a wchar_t null character marking the end of the string. A copy or concatenation operation does not perform boundary checking.
The wcscat subroutine copies the contents of the WcString2 parameter (including the terminating null wide-character code) to the end of the wide-character string pointed to by the WcString1 parameter. The initial wide-character code of the WcString2 parameter overwrites the null wide-character code at the end of the WcString1 parameter. If successful, the wcscat subroutine returns the WcString1 parameter. If the wcscat subroutine copies between overlapping objects, the result is undefined.
The wcschr subroutine returns a pointer to the first occurrence of the WideCharacter parameter in the WcString parameter. The character value may be a wchar_t null character. The wchar_t null character at the end of the string is included in the search. The wcschr subroutine returns a pointer to the wide character code, if found, or returns a null pointer if the wide character is not found.
The wcscmp subroutine compares two wchar_t strings. It returns an integer greater than 0 if the WcString1 parameter is greater than the WcString2 parameter. It returns 0 if the two strings are equivalent. It returns a number less than 0 if the WcString1 parameter is less than the WcString2 parameter. The sign of the difference in value between the first pair of wide-character codes that differ in the objects being compared determines the sign of a nonzero return value.
The wcscpy and the wcpcpy subroutines copy the contents of the WcString2 parameter (including the ending wchar_t null character) into the WcString1 parameter. If successful, the wcscpy subroutine returns the WcString1 parameter and the wcpcpy returns a pointer to the terminating null wide-character code copied into the WcString1. If these subroutines copy between overlapping objects, the result is undefined.
The wcscspn subroutine computes the number of wchar_t characters in the initial segment of the string pointed to by the WcString1 parameter that do not appear in the string pointed to by the WcString2 parameter. If successful, the wcscspn subroutine returns the number of wchar_t characters in the segment.
Item | Description |
---|---|
WcString1 | Points to a wide-character string. |
WcString2 | Points to a wide-character string. |
WideCharacter | Specifies a wide character for location. |
Upon successful completion, the wcscat and wcscpy subroutines return a value of ws1. The wcschr subroutine returns a pointer to the wide character code. Otherwise, a null pointer is returned.
The wcpcpy subroutine returns a pointer to the terminating null wide character code copied into the ws1.
The wcscmp subroutine returns an integer greater than, equal to, or less than 0, if the wide character string pointed to by the WcString1 parameter is greater than, equal to, or less than the wide character string pointed to by the WcString2 parameter.
The wcscspn subroutine returns the length of the segment.