|
|
|
7.21.5.6 The strspn function Synopsis 1 #include <string.h> size_t strspn(const char *s1, const char *s2); Description 2 The strspn function computes the length of the maximum initial segment of the string pointed to by s1 which consists entirely of characters from the string pointed to by s2 . Returns 3 The strspn function returns the length of the segment. 7.21.5.7 The strstr function Synopsis 1 #include <string.h> char *strstr(const char *s1, const char *s2); Description 2 The strstr function locates the first occurrence in the string pointed to by s1 of the sequence of characters (excluding the terminating null character) in the string pointed to s2 . Returns 3 The strstr function returns a pointer to the located string, or a null pointer if the string is not found. If s2 points to a string with zero length, the function returns s1 . 7.21.5.8 The strtok function Synopsis 1 #include <string.h> char *strtok(char * restrict s1, const char * restrict s2); Description 2 A sequence of calls to the strtok function breaks the string pointed to by s1 into a sequence of tokens, each of which is delimited by a character from the string pointed to s2 . The first call in the sequence has a non-null first argument; subsequent calls in the sequence have a null first argument. The separator string pointed to by s2 may be different from call to call. 3 The first call in the sequence searches the string pointed to by s1 for the first character that is not contained in the current separator string pointed to by s2 . If no such character is found, then there are no tokens in the string pointed to by s1 and the strtok function 332 Library §7.21.5.8 |