|
|
1.1 ! root 1: ! 2: ! 3: strcoll() String Function strcoll() ! 4: ! 5: ! 6: ! 7: ! 8: Compare two strings, using locale-specific information ! 9: ! 10: #include <string.h> ! 11: ! 12: strcoll lexicographically compares the string pointed to by ! 13: string1 with one pointed to by string2. Comparison ends when a ! 14: null character is read. ! 15: ! 16: strcoll compares the two strings character by character until it ! 17: finds a pair of characters that are not identical. It returns a ! 18: number less than zero if the character in string1 is less (i.e., ! 19: occurs earlier in the character table) than its counterpart in ! 20: string2. It returns a number greater than zero if the character ! 21: in string1 is greater (i.e., occurs later in the character table) ! 22: than its counterpart in string2. If no characters are found to ! 23: differ, then the strings are identical and strcoll returns zero. ! 24: ! 25: ***** See Also ***** ! 26: ! 27: string functions, string.h ! 28: ! 29: ***** Notes ***** ! 30: ! 31: The string-comparison routines strcoll, strcmp, and strncmp dif- ! 32: fer from the memory-comparison routine memcmp in that they com- ! 33: pare strings rather than regions of memory. They stop when they ! 34: encounter a null character, but memcmp does not. ! 35: ! 36: The ANSI Standard's description of strcoll emphasizes that it ! 37: uses locale-specific information, as set by the ANSI function ! 38: setlocale, to perform string comparisons. The COHERENT system ! 39: has not yet implement ANSI locales; therefore, strcoll does not ! 40: differ significantly from strcmp. It is included to support ! 41: programs written in ANSI C. ! 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.