strcoll 中文man頁面
NAME
strcoll - 用當(dāng)前的區(qū)域選項來比較兩個字符串
總覽 (SYNOPSIS)
#include <string.h> int strcoll(const char *s1, const char *s2);
描述 (DESCRIPTION)
strcoll() 函數(shù) 是用來 比較 s1 和 s2 兩個 字符串的. 如果 s1 不為空, 它會 返回 一個 小于, 等于 或者 大于 零的 整數(shù) 分別來表示 它 小于, 等于 或者 大于 s2. 它是 根據(jù) 程序 當(dāng)前的 區(qū)域選項 中的 LC_COLLATE 來 比較的. (見 setlocale(3)).
返回值 (RETURN VALUE)
如果 s1 不為空, strcoll() 函數(shù) 會 返回 一個 小于, 等于 或者 大于零的 整數(shù) 分別來 表示 它 小于, 等于 或者 大于 s2. 每個 字符串 都根據(jù)當(dāng)前的 區(qū)域選項 來解釋.
遵循 (CONFORMING TO)
SVID 3, BSD 4.3, ISO 9899
注意 (NOTES)
如果 區(qū)域選項 是 "POSIX" 或者 "C", 那么 strcoll() 同 strcmp() 是等價的.
參見 (SEE ALSO)
bcmp(3), memcmp(3), strcasecmp(3), strcmp(3), strxfrm(3), setlocale(3)
#p#
NAME
strcoll - compare two strings using the current locale
SYNOPSIS
#include <string.h> int strcoll(const char *s1, const char *s2);
DESCRIPTION
The strcoll() function compares the two strings s1 and s2. It returns an integer less than, equal to, or greater than zero if s1 is found, respectively, to be less than, to match, or be greater than s2. The comparison is based on strings interpreted as appropriate for the program's current locale for category LC_COLLATE. (See setlocale(3)).
RETURN VALUE
The strcoll() function returns an integer less than, equal to, or greater than zero if s1 is found, respectively, to be less than, to match, or be greater than s2, when both are interpreted as appropriate for the current locale.
CONFORMING TO
SVID 3, BSD 4.3, ISO 9899
NOTES
In the "POSIX" or "C" locales strcoll() is equivalent to strcmp().
SEE ALSO
bcmp(3), memcmp(3), strcasecmp(3), strcmp(3), strxfrm(3), setlocale(3)