string.h

string.h defines C prototypes of functions related to memory and string manipulation.

#include <string.h>

This header defines the following symbols:

Symbol Description
NULL A NULL pointer constant
size_t Unsigned integral type of the result of the sizeof operator


Functions:

Return Type: Function Description
void * memccpy(void *, const void *, int, size_t) Copies bytes between two memory areas
void * memchr(const void *, int, size_t) Finds byte in memory
int memcmp(const void *, const void *, size_t) Compares two memory areas
void * memcpy(void *, const void *, size_t) Copies N bytes between two memory areas
void * memmove(void *, const void *, size_t) Copies N bytes between two overlapping memory areas
void * memset(void *, int, size_t) Sets N bytes in memory to the specified value
char * strcat(char *, const char *) Concatenates two null-terminated strings
char * strchr(const char *, int)
Finds the first occurrence of a char in a null-terminated string
int strcmp(const char *, const char *) Compares two null-terminated strings
int strcoll(const char *, const char *) Compares two null-terminated strings with collating information
char * strcpy(char *, const char*) Copies source string to destination string (both null-terminated)
size_t strcspn(const char *, const char *) Returns the length of a null- terminated substring not found in another string
char * strdup(const char *) Duplicates a null-terminated string
char * strerror(int) Gets an error message string for the supplied error code
size_t strlen(const char *) Calculates the length of a null-terminated string
char * strncat(char *, const char *, size_t) Concatenates two null-terminated strings (with limit)
int strncmp(const char *, const char *, size_t) Compares two null-terminated strings (with limit)
char * strncpy(char *, const char *, size_t) Copies source string to destination string (both null-terminated and with limit)
char * strpbrk(const char *, const char *) Locates the first occurrence of a byte from one string in another (both null-terminated)
char * strrchr(const char *, int) Locates the last occurrence of a character in a null-terminated string
size_t strspn(const char *, const char *) Returns the length of a null- terminated substring
char * strstr(const char *, const char *) Locates the first occurrence of a null-terminated substring
char * strtok(char *, const char *) Splits a null-terminated string into tokens (not thread-safe)
char * strtok_r(char *, const char *, char **) Splits a null-terminated string into tokens (thread-safe)
size_t strxfrm(char *, const char *, size_t) Transforms one null-terminated string into another according to locale