OpenBSD manual page server

Manual Page Search Parameters

WCSCMP(3) Library Functions Manual WCSCMP(3)

wcscmp, wcsncmpcompare wide strings

#include <wchar.h>

int
wcscmp(const wchar_t *s1, const wchar_t *s2);

int
wcsncmp(const wchar_t *s1, const wchar_t *s2, size_t len);

The () and () functions lexicographically compare the wide strings s1 and s2. The wcsncmp() function compares at most len wide characters.

The wcscmp() and wcsncmp() functions return an integer greater than, equal to, or less than 0, according to whether the wide string s1 is greater than, equal to, or less than the wide string s2.

strcmp(3), wcscasecmp(3), wmemcmp(3)

The wcscmp() and wcsncmp() functions conform to ISO/IEC 9899:1999 (“ISO C99”) and were first introduced in ISO/IEC 9899/AMD1:1995 (“ISO C90, Amendment 1”).

The wcscmp() and wcsncmp() functions were ported from NetBSD and first appeared in OpenBSD 3.8.

June 5, 2013 OpenBSD-6.7