Manual browser: string(3)

Section:
Page:
STRING(3) Library Functions Manual STRING(3)

NAME

stpcpy, stpncpy, strcat, strlcat, strncat, strchr, strrchr, strcmp, strncmp, strcasecmp, strncasecmp, strcoll, strcpy, strlcpy, strncpy, strerror, strerror_r, strlen, strnlen, strpbrk, strsep, stresep, strspn, strcspn, strdup, strndup, strstr, strcasestr, strtok, strtok_r, strxfrmstring specific functions

LIBRARY

Standard C Library (libc, -lc)

SYNOPSIS

#include <string.h>

char *
stpcpy(char *dst, const char *src);

char *
stpncpy(char *dst, const char *src, size_t count);

char *
strcat(char *s, const char * append);

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

char *
strncat(char *s, const char *append, size_t count);

char *
strchr(const char *s, int c);

char *
strrchr(const char *s, int c);

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

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

int
strcasecmp(const char *s1, const char *s2);

int
strncasecmp(const char *s1, const char *s2, size_t count);

int
strcoll(const char *s1, const char *s2);

char *
strcpy(char *dst, const char *src);

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

char *
strncpy(char *dst, const char *src, size_t count);

char *
strerror(int errno);

int
strerror_r(int errnum, char *strerrbuf, size_t buflen);

size_t
strlen(const char *s);

size_t
strnlen(const char *s, size_t count);

char *
strpbrk(const char *s, const char *charset);

char *
strsep(char **stringp, const char *delim);

char *
stresep(char **stringp, const char *delim, int escape);

size_t
strspn(const char *s, const char *charset);

size_t
strcspn(const char *s, const char *charset);

char *
strdup(const char *str);

char *
strndup(const char *str, size_t len);

char *
strstr(const char *big, const char *little);

char *
strcasestr(const char *big, const char *little);

char *
strtok(char *s, const char *delim);

char *
strtok_r(char *s, const char *delim, char **lasts);

size_t
strxfrm(char *dst, const char *src, size_t n);

DESCRIPTION

The string functions manipulate strings terminated by a nul byte.

See the specific manual pages for more information. For manipulating variable length generic objects as byte strings (without the nul byte check), see bstring(3).

Except as noted in their specific manual pages, the string functions do not test the destination for size limitations.

STANDARDS

The strcat(), strncat(), strchr(), strrchr(), strcmp(), strncmp(), strcpy(), strncpy(), strcoll(), strerror(), strlen(), strpbrk(), strsep(), strspn(), strcspn(), strstr(), strtok(), and strxfrm() functions conform to ANSI X3.159-1989 (“ANSI C89”).

The strtok_r() function conforms to IEEE Std 1003.1c-1995 (“POSIX.1c”).

The strerror_r() function conform to IEEE Std 1003.1-2001 (“POSIX.1”).

May 1, 2009 NetBSD 7.0