c/string/wide/wcscspn

Returns the length of the maximum initial segment of the wide string pointed to by, that consists of only the characters not found in wide string pointed to by.

Return value
The length of the maximum initial segment that contains only characters not found in the character string pointed to by