| Functions | |||||||||||||||||||||||||||||||||||||||||
| Character manipulation | |||||||||||||||||||||||||||||||||||||||||
| Conversions to and from numeric formats | |||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||
| String manipulation | |||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||
| String examination | |||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||
| Memory manipulation | |||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||
| Miscellaneous | |||||||||||||||||||||||||||||||||||||||||
(C11)(C11) | |||||||||||||||||||||||||||||||||||||||||
Defined in header <string.h> | ||
size_t strspn(constchar* dest,constchar* src); | ||
Returns the length of the maximum initial segment (span) of the null-terminated byte string pointed to bydest, that consists of only the characters found in the null-terminated byte string pointed to bysrc.
The behavior is undefined if eitherdest orsrc is not a pointer to a null-terminated byte string.
Contents |
| dest | - | pointer to the null-terminated byte string to be analyzed |
| src | - | pointer to the null-terminated byte string that contains the characters to search for |
The length of the maximum initial segment that contains only characters from the null-terminated byte string pointed to bysrc.
Output:
After skipping initial lowercase letters from 'abcde312$#@'The remainder is '312$#@'
| returns the length of the maximum initial segment that consists of only the characters not found in another byte string (function)[edit] | |
(C95) | returns the length of the maximum initial segment that consists of only the wide characters found in another wide string (function)[edit] |
| finds the first location of any character in one string, in another string (function)[edit] | |
C++ documentation forstrspn | |