#include <string.h>
void *memchr
(const void * s , int c ,
size_t n );
The memchr function locates the first occurrence of c (converted to an unsigned char) in the initial n characters (each interpreted as an unsigned char) of the object pointed to by s.
The memchr function returns a pointer to the located character, or a null pointer if the character does not occur in the object.
None.
#include <string.h>
char *strchr
(char * s , int c
);
The strchr function locates the first occurrence of c (converted to a char) in the string pointed to by s. The terminating null character is considered to be part of the string.
The strchr function returns a pointer to the located character, or a null pointer if the character does not occur in the string.
None.
#include <string.h>
size_t
strcspn
(char *
s1 , char * s2
);
The strcspn function computes the length of the maximum initial segment of the string pointed to by s1 which consists entirely of characters not from the string pointed to by s2.
The strcspn function returns the length of the segment.
None.
#include <string.h>
size_t
strpbrk
(char *
s1 , char * s2
);
The strpbrk function locates the first occurrence in the string pointed to by s1 of any character from the string pointed to by s2.
The strpbrk function returns a pointer to the character, or a null pointer if no character from s2 occurs in s1.
None.
#include <string.h>
char *strrchr
(char * s , int c
);
The strrchr function locates the last occurrence of c (converted to char) in the string pointed to by s. The terminating null character is considered to be part of the string.
The strrchr function returns a pointer to the located character, or a null pointer if the character does not occur in the string.
None.
#include <string.h>
size_t
strspn
(const char *
s1 , const char * s2
);
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.
The strspn function returns the length of the segment.
None.
#include <string.h>
char *strstr
(char * s1 , const char *
s2 );
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 by s2.
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.
None.
#include <string.h>
char *strtok
(char * s1 , const char *
s2 );
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 by s2. The first call in the sequence has s1 as its first argument, and is followed by calls with a null pointer as their first argument. The separator string pointed to by s2 may be different from call to call.
The strtok function returns a pointer to the first character of a token, or a null pointer if there is no token.
None.