Standard library header <string.h>
From cppreference.com
This header provides functions for handling null-terminated byte strings.
Macros | ||
implementation-defined null pointer constant (macro constant) | ||
Types | ||
unsigned integer type returned by the sizeof 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 | ||
(C11)(C11) |
returns a text version of a given error code (function) |
[edit] Synopsis
#define __STDC_VERSION_STRING_H__ 202311L #define NULL /* see description */ typedef /* see description */ size_t; void* memcpy(void* restrict s1, const void* restrict s2, size_t n); void* memccpy(void* restrict s1, const void* restrict s2, int c, size_t n); void* memmove(void* s1, const void* s2, size_t n); char* strcpy(char* restrict s1, const char* restrict s2); char* strncpy(char* restrict s1, const char* restrict s2, size_t n); char* strdup(const char* s); char* strndup(const char* s, size_t n); char* strcat(char* restrict s1, const char* restrict s2); char* strncat(char* restrict s1, const char* restrict s2, size_t n); int memcmp(const void* s1, const void* s2, size_t n); int