Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

wcsncmp - Compare two wide character substrings

&pagelevel(4)&pagelevel

Definition   

#include <wchar.h>

int wcsncmp(const wchar_t *ws1, const wchar_t *ws2, size_t n);

wcsncmp compares the wide character strings ws1 and ws2 lexically up to a maximum length of n. For example:

Characters that follow the null wide character code are not included in the comparison.

Return val.

< 0

= 0

> 0

In the first n characters, ws1 is lexically less than ws2.

In the first n characters, ws1 and ws2 are lexically equal.

In the first n characters, ws1 is lexically greater than ws2.

Notes

This version of the C runtime system only supports one-byte characters as wide character codes.

Wide character strings terminated with the null wide character (\0) are expected as arguments.

See also

strncmp, wcscmp