Everything

strspn


Checks a specified string from the beginning and counts the number of consecutive characters at the beginning that are included in another string specified.

[Format]

#include <string.h>

size_t strspn (const char *s1, const char *s2);

[Parameters]

s1 Pointer to the string to be checked

s2 Pointer to the string used to check s1

[Return values]

Number of characters at the beginning of the s1 string that are included in the s2 string

[Remarks]

The strspn function checks from the beginning of the string specified by s1, counts the number of consecutive characters that are included in another string specified by s2, and returns that length.