Facebook Page Twitter Page LinkedIn Page
× C Standard Library


The C has a number of functions and macros that are available to work with C strings and arrays. These functions are available to use in a current program after including the header file using - #include <string.h>. All functions and macros of this header file are listed below:

Library Functions

Copy Functions

FunctionsDescription
memcpy() Copy block of memory.
memmove() Move block of memory.
strcpy() Copy string.
strncpy() Copy characters from string.

Comparison Functions

FunctionsDescription
memcmp() Compares two blocks of memory.
strcmp() Compares two strings.
strncmp() Compare characters of two strings.

Concatenation Functions

FunctionsDescription
strcat() Concatenate strings.
strncat() Append characters from string.

Searching Functions

FunctionsDescription
memchr() Locate character in block of memory.
strchr() Searches the first occurrence of a character in a string.
strcspn() Get span until character in string.
strpbrk() Searches the first occurrence of any character of a string inside another string.
strrchr() Searches the last occurrence of a character in a string.
strspn() Get span of character set in string.
strstr() Searches the first occurrence of a string inside another string.

Other Functions

FunctionsDescription
memset() Fills a block of memory.
strlen() Returns the length of a byte string.

Library Types

TypesDescription
size_t Unsigned integer type.