char * lastchar(char * String, char ch) {
char * pStr = NULL;
// traverse the entire string
while ( * String++ != NULL) {
if ( * String == ch)
pStr = String;
}
return pStr;
}
Be the first to receive the latest updates from Codesdoc by signing up to our email subscription.