cpp/string/byte/strspn

Returns the length of the maximum initial segment (span) of the byte string pointed to by, that consists of only the characters found in byte string pointed to by.

Return value
The length of the maximum initial segment that contains only characters from byte string pointed to by.