strcspn() — Compare Strings
Format
#include <string.h>
size_t strcspn(const char *string1, const char *string2);
General Description
The strcspn() function computes the length of the initial portion of the string pointed to by string1 that contains no characters from the string pointed to by string2.
Returned Value
The strcspn() function returns the calculated length of the initial portion found.
Related Information
- string.h — Declare string manipulation functions
- strcat() — Concatenate Strings
- strchr() — Search for Character
- strcmp() — Compare Strings
- strcpy() — Copy String
- strncmp() — Compare Strings
- strpbrk() — Find Characters in String
- strrchr() — Find Last Occurrence of Character in String
- strspn() — Search String