C-string.h-APIs

API name

API description

strlen

calculate the length of a string

strcat

concatenate two strings

strncat

concatenate two strings

strlcat

size-bounded string concatenation

strcmp

compare two strings

strncmp

compare part of two strings

strchr

string scanning operation

strrchr

string scanning operation

strchrnul

string scanning operation

strstr

find a substring

strcasestr

find a substring

strcasecmp

case-insensitive string comparisons

strpbrk

scan a string for a byte

strsep

extract token from string

strspn

get length of a substring

strtok

split string into tokens

strtok_r

split string into tokens

strcpy

copy a string and return a pointer to the end of the result

strncpy

copy fixed length string, returning a pointer to the array end

strlcpy

size-bounded string copying

stpcpy

copy a string and return a pointer to the end of the result

strcoll

string comparison using collating information

strcspn

get the length of a complementary substring

strdup

duplicate a specific number of bytes from a string

strndup

duplicate a specific number of bytes from a string

strfry

randomize a string

strxfrm

string transformation