MicrOS
strspn.c File Reference
#include "../string.h"

Functions

size_t strspn (const char *str1, const char *str2)
 Get span of character set in string. More...
 

Function Documentation

◆ strspn()

size_t strspn ( const char *  str1,
const char *  str2 
)

Get span of character set in string.

Returns the length of the initial portion of str1 which consists only of characters that are part of str2.

Parameters
str1C string to be scanned.
str2C string containing the characters to match.
Returns
The length of the initial portion of str1 containing only characters that appear in str2.