|
|
1.1 ! root 1: ! 2: ! 3: strchr() String Function strchr() ! 4: ! 5: ! 6: ! 7: ! 8: Find a character in a string ! 9: ! 10: #include <string.h> ! 11: ! 12: cchhaarr *ssttrrcchhrr(_s_t_r_i_n_g, _c_h_a_r_a_c_t_e_r); ! 13: cchhaarr *_s_t_r_i_n_g; iinntt _c_h_a_r_a_c_t_e_r; ! 14: ! 15: strchr searches for the first occurrence of character within ! 16: string. The null character at the end of string is included ! 17: within the search. It is equivalent to the COHERENT function iinn- ! 18: ddeexx. ! 19: ! 20: strchr returns a pointer to the first occurrence of character ! 21: within string. If character is not found, it returns NULL. ! 22: ! 23: Having ssttrrcchhrr search for a null character will always produce a ! 24: pointer to the end of a string. For example, ! 25: ! 26: ! 27: char *string; ! 28: assert(strchr(string, '\0') == string + strlen(string)); ! 29: ! 30: ! 31: never fails. ! 32: ! 33: ***** See Also ***** ! 34: ! 35: string functions ! 36: ! 37: ! 38: ! 39: ! 40: ! 41: ! 42: ! 43: ! 44: ! 45: ! 46: ! 47: ! 48: ! 49: ! 50: ! 51: ! 52: ! 53: ! 54: ! 55: ! 56: ! 57: ! 58: ! 59: ! 60: ! 61: ! 62: ! 63: ! 64: COHERENT Lexicon Page 1 ! 65: ! 66:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.