SYNOPSIS
       #include 

       char *strchr(const char *s, int c);

       char *strrchr(const char *s, int c);
DESCRIPTION
strchr returns a pointer to the first occurence of the character c in the string s. strrchr returns the last. Both return NULL if no match is found.

NOTES
This str function is useful when you need to find that one, special character in a string - the first instance of it, mind you. Say, a delimeter, although strsep would be better for that. One possible use would be to clean out whitespace around a quoted string. The implementation of this is left as an exercise for the noder.

Log in or register to write something here or to contact authors.