STRCMP(9) | Kernel Developer's Manual | STRCMP(9)

# NAME

`strlen`, `strnlen`, `strncpy`, `strlcpy`, `strlcat`, `strcmp`, `strncmp`, `strncasecmp` — kernel library string routines

# SYNOPSIS

`#include <lib/libkern/libkern.h>`

size_t
`strlen`(const char *s);

size_t
`strnlen`(const char *s, size_t maxlen);

char *
`strncpy`(char *dst, const char *src, size_t len);

size_t
`strlcpy`(char *dst, const char *src, size_t size);

size_t
`strlcat`(char *dst, const char *src, size_t size);

int
`strcmp`(const char *s1, const char *s2);

int
`strncmp`(const char *s1, const char *s2, size_t len);

int
`strncasecmp`(const char *s1, const char *s2, size_tlen);

# DESCRIPTION

These functions have the same semantics as their libc counterparts, strlen(3), strncpy(3), strnlen(3), strlcpy(3), strlcat(3), strcmp(3), strncmp(3) and strncasecmp(3).

# SEE ALSO

strcmp(3), strlcat(3), strlcpy(3), strlen(3), strncmp(3), strncpy(3), strnlen(3)

# STANDARDS

The `strlen`(), `strncpy`(), `strcmp`(), `strncmp`() and `strcasecmp`() functions conform to ANSI X3.159-1989 (“ANSI C89”).

April 23, 2018 | Debian