1WCSNCMP(3)                 Linux Programmer's Manual                WCSNCMP(3)
2
3
4

NAME

6       wcsncmp - compare two fixed-size wide-character strings
7

SYNOPSIS

9       #include <wchar.h>
10
11       int wcsncmp(const wchar_t *s1, const wchar_t *s2, size_t n);
12

DESCRIPTION

14       The   wcsncmp()  function  is  the  wide-character  equivalent  of  the
15       strncmp(3) function.  It compares the wide-character string pointed  to
16       by  s1  and  the  wide-character string pointed to by s2, but at most n
17       wide characters from each string.  In each string, the  comparison  ex‐
18       tends only up to the first occurrence of a null wide character (L'\0'),
19       if any.
20

RETURN VALUE

22       The wcsncmp() function returns zero if the wide-character strings at s1
23       and  s2, truncated to at most length n, are equal.  It returns an inte‐
24       ger greater than zero if at the first differing position i (i < n), the
25       corresponding  wide-character  s1[i] is greater than s2[i].  It returns
26       an integer less than zero if at the first differing position i (i < n),
27       the corresponding wide-character s1[i] is less than s2[i].
28

ATTRIBUTES

30       For  an  explanation  of  the  terms  used  in  this  section,  see at‐
31       tributes(7).
32
33       ┌────────────────────────────────────────────┬───────────────┬─────────┐
34Interface                                   Attribute     Value   
35       ├────────────────────────────────────────────┼───────────────┼─────────┤
36wcsncmp()                                   │ Thread safety │ MT-Safe │
37       └────────────────────────────────────────────┴───────────────┴─────────┘
38

CONFORMING TO

40       POSIX.1-2001, POSIX.1-2008, C99.
41

SEE ALSO

43       strncmp(3), wcsncasecmp(3)
44

COLOPHON

46       This page is part of release 5.13 of the Linux  man-pages  project.   A
47       description  of  the project, information about reporting bugs, and the
48       latest    version    of    this    page,    can     be     found     at
49       https://www.kernel.org/doc/man-pages/.
50
51
52
53GNU                               2021-03-22                        WCSNCMP(3)
Impressum