The <string.h> header provides many functions useful for manipulating strings (character arrays).
The <string.h> header shall define the following macros:
The <string.h> header shall define the following function:
String manipulation:
String examination:
Memory manipulation:
Miscellaneous:
The <string.h> header shall define the following type:
Related topics:
<setdef.h> | <stdint.h> | <stdio.h> | <stdlib.h> | <stdnoreturn.h> | Standard Library in C
List of topics: C Programming
The <string.h> header shall define the following macros:
| NULL | Null pointer |
The <string.h> header shall define the following function:
String manipulation:
| strcpy strcpy_s(C11) | copies one string to another |
| strncpy strncpy_s(C11) | copies a certain amount of characters from one string to another |
| strcat strcat_s(C11) | concatenates two strings |
| strncat strncat_s(C11) | concatenates a certain amount of characters of two strings |
| strxfrm | transform a string so that strcmp would produce the same result as strcoll |
String examination:
| strlen strnlen_s(C11) | returns the length of a given string |
| strcmp | compares two strings |
| strncmp | compares a certain amount of characters of two strings |
| strcoll | compares two strings in accordance to the current locale |
| strchr | finds the first occurrence of a character |
| strrchr | finds the last occurrence of a character |
| strspn | returns the length of the maximum initial segment that consists of only the characters found in another byte string |
| strcspn | returns the length of the maximum initial segment that consists of only the characters not found in another byte string |
| strpbrk | finds the first location of any character in one string, in another string |
| strstr | finds the first occurrence of a substring of characters |
| strtok strtok_s(C11) | finds the next token in a byte string |
Memory manipulation:
| memchr | searches an array for the first occurrence of a character |
| memcmp | compares two buffers |
| memset memset_s(C11) | fills a buffer with a character |
| memcpy memcpy_s(C11) | copies one buffer to another |
| memmove memmove_s(C11) | moves one buffer to another |
Miscellaneous:
| strerror strerror_s(C11) strerrorlen_s(C11) | returns a text version of a given error code |
The <string.h> header shall define the following type:
| size_t | Unsigned integral type |
Related topics:
<setdef.h> | <stdint.h> | <stdio.h> | <stdlib.h> | <stdnoreturn.h> | Standard Library in C
List of topics: C Programming
No comments:
Post a Comment