strchr (string, char_as_string) strrchr (string, char_as_string)
Any character string.
A string containing the one character to be found.
The position of the char_as_string within the string, where the first character is in position zero. If the char_as_string is not found in the string, returns -1. strchr returns the first occurrence of the character in the string. strrchr returns the last occurrence of the character in the string.
These functions search a string for an individual character and return the first or last occurrence of that character within the string. The characters within a string are numbered starting at zero.
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.