From cppreference.com
This header provides functions for handling
.
Macros
implementation-defined null pointer constant
(macro constant)
Types
unsigned integer type returned by the
operator
(typedef)
Functions
String manipulation
(C11)
copies one string to another
(function)
(C11)
copies a certain amount of characters from one string to another
(function)
(C11)
concatenates two strings
(function)
(C11)
concatenates a certain amount of characters of two strings
(function)
transform a string so that strcmp would produce the same result as strcoll
(function)
(C23)
allocates a copy of a string
(function)
(C23)
allocates a copy of a string of specified size
(function)
String examination
(C11)
returns the length of a given string
(function)
compares two strings
(function)
compares a certain amount of characters of two strings
(function)
compares two strings in accordance to the current locale
(function)
finds the first occurrence of a character
(function)
finds the last occurrence of a character
(function)
returns the length of the maximum initial segment that consists
of only the characters found in another byte string
(function)
returns the length of the maximum initial segment that consists
of only the characters not found in another byte string
(function)
finds the first location of any character in one string, in another string
(function)
finds the first occurrence of a substring of characters
(function)
(C11)
finds the next token in a byte string
(function)
Character array manipulation
searches an array for the first occurrence of a character
(function)
compares two buffers
(function)
(C23)(C11)
fills a buffer with a character
(function)
(C11)
copies one buffer to another
(function)
(C11)
moves one buffer to another
(function)
(C23)
copies one buffer to another, stopping after the specified delimiter
(function)
Miscellaneous
strerrorstrerror_sstrerrorlen_s
(C11)(C11)
returns a text version of a given error code
(function)
Synopsis
#define __STDC_VERSION_STRING_H__ 202311L#define NULL /* see description */typedef/* see description */size_t;void*memcpy(void*restricts1,constvoid*restricts2,size_tn);void*memccpy(void*restricts1,constvoid*restricts2,intc,size_tn);void*memmove(void*s1,constvoid*s2,size_tn);char*strcpy(char*restricts1,constchar*restricts2);char*strncpy(char*restricts1,constchar*restricts2,size_tn);char*strdup(constchar*s);char*strndup(constchar*s,size_tn);char*strcat(char*restricts1,constchar*restricts2);char*strncat(char*restricts1,constchar*restricts2,size_tn);intmemcmp(constvoid*s1,constvoid*s2,size_tn);intstrcmp(constchar*s1,constchar*s2);intstrcoll(constchar*s1,constchar*s2);intstrncmp(constchar*s1,constchar*s2,size_tn);size_tstrxfrm(char*restricts1,constchar*restricts2,size_tn);/*QVoid*/*memchr(/*QVoid*/*s,intc,size_tn);/*QChar*/*strchr(/*QChar*/*s,intc);size_tstrcspn(constchar*s1,constchar*s2);/*QChar*/*strpbrk(/*QChar*/*s1,constchar*s2);/*QChar*/*strrchr(/*QChar*/*s,intc);size_tstrspn(constchar*s1,constchar*s2);/*QChar*/*strstr(/*QChar*/*s1,constchar*s2);char*strtok(char*restricts1,constchar*restricts2);void*memset(void*s,intc,size_tn);void*memset_explicit(void*s,intc,size_tn);char*strerror(interrnum);size_tstrlen(constchar*s);size_tstrnlen(constchar*s,size_tn);Only if the implementation defines __STDC_LIB_EXT1__ and additionally the user code defines __STDC_WANT_LIB_EXT1__ before any inclusion of <string.h>:
#ifdef __STDC_WANT_LIB_EXT1__tyepdef/* see description */errno_t;tyepdef/* see description */rsize_t;errno_tmemcpy_s(void*restricts1,rsize_ts1max,constvoid*restricts2,rsize_tn);errno_tmemmove_s(void*s1,rsize_ts1max,constvoid*s2,rsize_tn);errno_tstrcpy_s(char*restricts1,rsize_ts1max,constchar*restricts2);errno_tstrncpy_s(char*restricts1,rsize_ts1max,constchar*restricts2,rsize_tn);errno_tstrcat_s(char*restricts1,rsize_ts1max,constchar*restricts2);errno_tstrncat_s(char*restricts1,rsize_ts1max,constchar*restricts2,rsize_tn);char*strtok_s(char*restricts1,rsize_t*restricts1max,constchar*restricts2,char**restrictptr);errno_tmemset_s(void*s,rsize_tsmax,intc,rsize_tn)errno_tstrerror_s(char*s,rsize_tmaxsize,errno_terrnum);size_tstrerrorlen_s(errno_terrnum);size_tstrnlen_s(constchar*s,size_tmaxsize);#endif