|
|
coherent
strchr() String Function strchr()
Find a character in a string
#include <string.h>
cchhaarr *ssttrrcchhrr(_s_t_r_i_n_g, _c_h_a_r_a_c_t_e_r);
cchhaarr *_s_t_r_i_n_g; iinntt _c_h_a_r_a_c_t_e_r;
strchr searches for the first occurrence of character within
string. The null character at the end of string is included
within the search. It is equivalent to the COHERENT function iinn-
ddeexx.
strchr returns a pointer to the first occurrence of character
within string. If character is not found, it returns NULL.
Having ssttrrcchhrr search for a null character will always produce a
pointer to the end of a string. For example,
char *string;
assert(strchr(string, '\0') == string + strlen(string));
never fails.
***** See Also *****
string functions
COHERENT Lexicon Page 1
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.