strxfrm 中文man页面

系统
strxfrm() 函数 把 字符串 src 转换 成 另外 一种 形式. 用 strcmp() 来比较 两个 转换后的 字符串 与 用 strcoll() 来比较 它们转换前的 字符串 的 返回值 是 一样的. 转换后的 字符串的 前 n 个 字符会存放于 dest 中. 它是 根据 程序 当前的 区域选项 中的 LC_COLLATE 来 转换的. (见 setlocale(3)).

NAME

strxfrm - 转换字符串

总览 (SYNOPSIS)

#include <string.h>

size_t strxfrm(char *dest, const char *src, size_t n);

描述 (DESCRIPTION)

strxfrm() 函数 把 字符串 src 转换 成 另外 一种 形式. 用 strcmp() 来比较 两个 转换后的 字符串 与 用 strcoll() 来比较 它们转换前的 字符串 的 返回值 是 一样的. 转换后的 字符串的 前 n 个 字符会存放于 dest 中. 它是 根据 程序 当前的 区域选项 中的 LC_COLLATE 来 转换的. (见 setlocale(3)).

返回值 (RETURN VALUE)

strxfrm() 函数 返回 除去 结尾的 `\0' 字符, 用来 存储 转换后的 字符串所 需要的 字节数. 如果 返回值 大于 或 等于 n, dest 中的 内容就是 不确定的.

遵循 (CONFORMING TO)

SVID 3, BSD 4.3, ISO 9899

注意 (NOTES)

如果 区域选项 是 "POSIX" 或者 "C", 那么 strxfrm() 同用 strncpy() 来 拷贝 字符串 是等价的.

参见 (SEE ALSO)

bcmp(3), memcmp(3), strcasecmp(3), strcmp(3), strcoll(3), setlocale(3)

#p#

NAME

strxfrm - string transformation  

SYNOPSIS

#include <string.h>

size_t strxfrm(char *dest, const char *src, size_t n);

DESCRIPTION

The strxfrm() function transforms the src string into a form such that the result of strcmp() on two strings that have been transformed with strxfrm() is the same as the result of strcoll() on the two strings before their transformation. The first n characters of the transformed string are placed in dest. The transformation is based on the program's current locale for category LC_COLLATE. (See setlocale(3)).  

RETURN VALUE

The strxfrm() function returns the number of bytes required to store the transformed string in dest excluding the terminating `\0' character. If the value returned is n or more, the contents of dest are indeterminate.  

CONFORMING TO

SVID 3, BSD 4.3, ISO 9899  

NOTES

In the "POSIX" or "C" locales strxfrm() is equivalent to copying the string with strncpy().  

SEE ALSO

bcmp(3), memcmp(3), strcasecmp(3), strcmp(3), strcoll(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 15:39:42

fcloseall中文man

2011-08-25 15:00:15

cfgetispeed中文man

2011-08-19 18:35:50

issue中文man

2011-08-25 17:03:51

pclose中文man

2011-08-25 17:40:25

setvbuf中文man

2011-08-23 14:21:16

poweroff中文man

2011-08-24 15:52:59

intro中文man

2011-08-23 13:40:31

2011-08-25 17:24:54

puts中文man

2011-08-25 18:34:55

ungetc中文man

2011-08-23 10:03:40

useradd中文man

2011-08-23 10:29:02

chpasswd中文man

2011-08-23 10:34:22

convertquot中文man

2011-08-23 15:39:34

rpmbuild中文man

2011-08-24 15:48:38

INSERT中文man

2011-08-25 09:40:49

UPDATE中文man
点赞
收藏

51CTO技术栈公众号