.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" .\" References consulted: .\" Linux libc source code .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sun Jul 25 10:41:28 1993 by Rik Faith (faith@cs.unc.edu) .TH STRXFRM 3 1993-04-12 "GNU" "Linux Programmer's Manual" .SH NAME strxfrm \- 转换字符串 .SH "总览 (SYNOPSIS)" .nf .B #include .sp .BI "size_t strxfrm(char *" dest ", const char *" src ", size_t " n ); .fi .SH "描述 (DESCRIPTION)" \fBstrxfrm()\fP 函数 把 字符串 \fIsrc\fP 转换 成 另外 一种 形式. 用 \fBstrcmp()\fP 来比较 两个 转换后的 字符串 与 用 \fBstrcoll()\fP 来比较 它们 转换前的 字符串 的 返回值 是 一样的. 转换后的 字符串的 前 \fIn\fP 个 字符 会存放于 \fIdest\fP 中. 它是 根据 程序 当前的 区域选项 中的 \fILC_COLLATE\fP 来 转换的. (见 \fBsetlocale\fP(3)). .SH "返回值 (RETURN VALUE)" \fBstrxfrm()\fP 函数 返回 除去 结尾的 `\\0' 字符, 用来 存储 转换后的 字符串 所 需要的 字节数. 如果 返回值 大于 或 等于 \fIn\fP, \fIdest\fP 中的 内容 就是 不确定的. .SH "遵循 (CONFORMING TO)" SVID 3, BSD 4.3, ISO 9899 .SH "注意 (NOTES)" 如果 区域选项 是 \fI"POSIX"\fP 或者 \fI"C"\fP, 那么 \fBstrxfrm()\fP 同 用 \fBstrncpy()\fP 来 拷贝 字符串 是等价的. .SH "参见 (SEE ALSO)" .BR bcmp "(3), " memcmp "(3), " strcasecmp "(3), " strcmp (3), .BR strcoll "(3), " setlocale (3) .SH "[中文版维护人]" .B 唐友 \ .SH "[中文版最新更新]" .BR 2002/1/28 .SH "[中国Linux论坛man手册页翻译计划]" .BI http://cmpp.linuxforum.net .SH "跋" .br 本页面中文版由中文 man 手册页计划提供。 .br 中文 man 手册页计划:\fBhttps://github.com/man-pages-zh/manpages-zh\fR