A pointer to a wide-character string, where each element is of type `wchar_t`. Used for representing text in wide-character encoding to support extended character sets.
A pointer to a wide-character string, where each element is of type `wchar_t`. Used for representing text in wide-character encoding to support extended character sets.
1st Parameter
Pointer to the destination wide-character string. The destination buffer must be large enough to hold the result, including the null terminator.
2nd Parameter Type : const wchar_t *
A pointer to a read-only wide-character string, where each character is of type `wchar_t`. Used for representing text in wide-character encoding to support extended character sets, such as Unicode. The string is null-terminated, with the terminator being a `wchar_t` with value 0.
2nd Parameter
Pointer to the source null-terminated wide-character string to be appended to `dest`.
3rd Parameter Type : size_t
Platform-specific unsigned type for array indices and memory sizes.
3rd Parameter
The maximum number of wide characters to append from `src`. The resulting string in `dest` is null-terminated.
Read more about parameters of wcsncat in parameters section
The wcsncatfunction in C language Appends a specified number of wide characters from the source wide character string to the destination wide character string.
wcsncat appends not more than n wide characters from the wide string pointed to by src to the end of the wide string pointed to by dest. The first wide character of src overwrites the null wide character at the end of dest. A terminating null wide character is always appended to the result.
The wcsncatfunction takes 3
parameters:
•
wchar_t * `dest`: Pointer to the destination wide-character string. The destination buffer must be large enough to hold the result, including the null terminator.
•
const wchar_t * `src`: Pointer to the source null-terminated wide-character string to be appended to `dest`.
•
size_t `n`: The maximum number of wide characters to append from `src`. The resulting string in `dest` is null-terminated.
Appends at most `n` wide characters from the wide-character string `src` to the end of `dest`. The destination string will always be null-terminated unless `n` is zero. The behavior is undefined if the destination buffer does not have enough space to hold the resulting string, or if the source and destination strings overlap. Returns a pointer to `dest`.
The wcsncat function return value :
Returns a pointer to the resulting wide string dest
Output
This example demonstrates the basic usage of wcsncat to append a limited number of characters from one wide string to another.