const char * strchr ( const char * str, int character ); char *strchr ( char * str, int character );
Locate first occurrence of character in string
Returns a pointer to the first occurrenceof character in the Cstring
str.
The terminating null-character is considered part of the Cstring. Therefore, it can also be located in order to retrieve apointer to the end of a string.
Parameters(参数)
str : C string.character:Character to be located. It is passed asits int promotion, butit is internally converted backto charfor thecomparison.Return Value:
A pointer to the first occurrenceof character in str.Ifthe character isnot found, the function returns a null pointer.
|