strcoll 中文man页面

系统
strcoll() 函数 是用来 比较 s1 和 s2 两个 字符串的. 如果 s1 不为空, 它会 返回 一个 小于, 等于 或者 大于 零的 整数 分别来表示 它 小于, 等于 或者 大于 s2. 它是 根据 程序 当前的 区域选项 中的 LC_COLLATE 来 比较的. (见 setlocale(3)).

NAME

strcoll - 用当前的区域选项来比较两个字符串

总览 (SYNOPSIS)

#include <string.h>

int strcoll(const char *s1, const char *s2);

描述 (DESCRIPTION)

strcoll() 函数 是用来 比较 s1s2 两个 字符串的. 如果 s1 不为空, 它会 返回 一个 小于, 等于 或者 大于 零的 整数 分别来表示 它 小于, 等于 或者 大于 s2. 它是 根据 程序 当前的 区域选项 中的 LC_COLLATE 来 比较的. (见 setlocale(3)).

返回值 (RETURN VALUE)

如果 s1 不为空, strcoll() 函数 会 返回 一个 小于, 等于 或者 大于零的 整数 分别来 表示 它 小于, 等于 或者 大于 s2. 每个 字符串 都根据当前的 区域选项 来解释.

遵循 (CONFORMING TO)

SVID 3, BSD 4.3, ISO 9899

注意 (NOTES)

如果 区域选项 是 "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)

责任编辑:韩亚珊 来源: CMPP.net
相关推荐

2011-08-24 16:48:36

man中文man

2011-08-15 10:21:09

man中文man

2011-08-11 16:11:49

at中文man

2011-08-25 10:21:56

man.conf中文man

2011-08-25 16:47:37

fwrite中文man

2011-08-25 16:50:08

getc中文man

2011-08-25 16:52:54

getchar中文man

2011-08-25 17:03:51

pclose中文man

2011-08-25 16:22:29

fputc中文man

2011-08-25 16:28:50

fread中文man

2011-08-25 17:24:54

puts中文man

2011-08-25 17:27:58

rewind中文man

2011-08-25 17:32:40

setbuffer中文man

2011-08-25 16:10:52

fgets中文man

2011-08-25 17:20:37

putchar中文man

2011-08-25 15:54:08

ferror中文man

2011-08-23 17:09:56

telinit中文man

2011-08-23 18:00:21

LDP中文man

2011-08-23 17:42:39

vmstat中文man

2011-08-23 17:49:36

zdump中文man
点赞
收藏

51CTO技术栈公众号