strtok

Defined in header <string.h> (1) char *strtok( char *str, const char *delim ); (until C99) char *strtok( char *restrict str, const char *restrict delim ); (since C99) char *strtok_s(char *restrict str, rsize_t *restrict strmax, const char *restrict delim, char **restrict ptr); (2) (since C11) 1) Finds the next token in a null-terminated byte string pointed to by str. The separator characters are identified by null-terminated byte string pointed to by delim

strtol

Defined in header <stdlib.h> long strtol( const char *str, char **str_end, int base ); (until C99) long strtol( const char *restrict str, char **restrict str_end, int base ); (since C99) long long strtoll( const char *restrict str, char **restrict str_end, int base ); (since C99) Interprets an integer value in a byte string pointed to by str. Discards any whitespace characters (as identified by calling isspace()) until the first non-w

strspn

Defined in header <string.h> size_t strspn( const char *dest, const char *src ); Returns the length of the maximum initial segment (span) of the null-terminated byte string pointed to by dest, that consists of only the characters found in the null-terminated byte string pointed to by src. The behavior is undefined if either dest or src is not a pointer to a null-terminated byte string. Parameters dest - pointer to the null-terminated byte string to be analyzed src

strstr

Defined in header <string.h> char *strstr( const char* str, const char* substr ); Finds the first occurrence of the null-terminated byte string pointed to by substr in the null-terminated byte string pointed to by str. The terminating null characters are not compared. The behavior is undefined if either str or substr is not a pointer to a null-terminated byte string. Parameters str - pointer to the null-terminated byte string to examine substr - pointer to the

strtof

Defined in header <stdlib.h> float strtof( const char *restrict str, char **restrict str_end ); (since C99) double strtod( const char *str, char **str_end ); (until C99) double strtod( const char *restrict str, char **restrict str_end ); (since C99) long double strtold( const char *restrict str, char **restrict str_end ); (since C99) Interprets a floating point value in a byte string pointed to by str. Function discards an

strncpy

Defined in header <string.h> (1) char *strncpy( char *dest, const char *src, size_t count ); (until C99) char *strncpy( char *restrict dest, const char *restrict src, size_t count ); (since C99) errno_t strncpy_s(char *restrict dest, rsize_t destsz, const char *restrict src, rsize_t count); (2) (since C11) 1) Copies at most count characters of the character array pointed to by src (including the terminating null character, but not any of the c

strpbrk

Defined in header <string.h> char* strpbrk( const char* dest, const char* breakset ); Scans the null-terminated byte string pointed to by dest for any character from the null-terminated byte string pointed to by breakset, and returns a pointer to that character. The behavior is undefined if either dest or breakset is not a pointer to a null-terminated byte string. Parameters dest - pointer to the null-terminated byte string to be analyzed breakset - pointer to

strncmp

Defined in header <string.h> int strncmp( const char *lhs, const char *rhs, size_t count ); Compares at most count characters of two possibly null-terminated arrays. The comparison is done lexicographically. The sign of the result is the sign of the difference between the values of the first pair of characters (both interpreted as unsigned char) that differ in the arrays being compared. The behavior is undefined when access occurs past the end of either array lhs or rhs. Th

strrchr

Defined in header <string.h> char *strrchr( const char *str, int ch ); Finds the last occurrence of ch (after conversion to char as if by (char)ch) in the null-terminated byte string pointed to by str (each character interpreted as unsigned char). The terminating null character is considered to be a part of the string and can be found if searching for '\0'. The behavior is undefined if str is not a pointer to a null-terminated byte string. Parameters str - pointer t

string literals

Constructs an unnamed object of specified character array type in-place, used when a character string needs to be embedded in source code. Syntax " s-char-sequence " (1) u8 " s-char-sequence " (2) (since C11) u " s-char-sequence " (3) (since C11) U " s-char-sequence " (4) (since C11) L " s-char-sequence " (5) where. s-char-sequence - zero or more characters, each of which is either a multibyte character from the source character set (excluding ("), \, and