|
|
1.1 ! root 1: ! 2: ! 3: strncmp() String Function strncmp() ! 4: ! 5: ! 6: ! 7: ! 8: Compare two strings ! 9: ! 10: #include <string.h> ! 11: iinntt ssttrrnnccmmpp(_s_t_r_i_n_g_1, _s_t_r_i_n_g_2, _n) ! 12: cchhaarr *_s_t_r_i_n_g_1, *_s_t_r_i_n_g_2; uunnssiiggnneedd _n; ! 13: ! 14: strncmp compares lexicographically the first n bytes of string1 ! 15: with string2. Comparison ends when n bytes have been compared, ! 16: or a null character encountered, whichever occurs first. strncmp ! 17: returns zero if the strings are identical, returns a number less ! 18: than zero if string1 occurs earlier alphabetically than string2, ! 19: and returns a number greater than zero if it occurs later. This ! 20: routine is compatible with the ordering routine needed by qsort. ! 21: ! 22: ***** Example ***** ! 23: ! 24: For an example of this function, see the entry for ssttrrnnccppyy. ! 25: ! 26: ***** See Also ***** ! 27: ! 28: strcmp(), string functions, string.h ! 29: ! 30: ! 31: ! 32: ! 33: ! 34: ! 35: ! 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.