OSDN Git Service

4e102f8e43319c9e7ee228da9face4719197ce25
[linuxjm/LDP_man-pages.git] / draft / man3 / wcsncmp.3
1 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
2 .\"
3 .\" This is free documentation; you can redistribute it and/or
4 .\" modify it under the terms of the GNU General Public License as
5 .\" published by the Free Software Foundation; either version 2 of
6 .\" the License, or (at your option) any later version.
7 .\"
8 .\" References consulted:
9 .\"   GNU glibc-2 source code and manual
10 .\"   Dinkumware C library reference http://www.dinkumware.com/
11 .\"   OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
12 .\"   ISO/IEC 9899:1999
13 .\"
14 .\" About this Japanese page, please contact to JM Project <JM@linux.or.jp>
15 .\" Translated Mon Oct 18 23:40:56 JST 1999
16 .\"           by FUJIWARA Teruyoshi <fujiwara@linux.or.jp>
17 .\"
18 .TH WCSNCMP 3  2011-09-28 "GNU" "Linux Programmer's Manual"
19 .\"O .SH NAME
20 .SH 名前
21 .\"O wcsncmp \- compare two fixed-size wide-character strings
22 wcsncmp \- 2 つの固定長ワイド文字文字列を比較する
23 .\"O .SH SYNOPSIS
24 .SH 書式
25 .nf
26 .B #include <wchar.h>
27 .sp
28 .BI "int wcsncmp(const wchar_t *" s1 ", const wchar_t *" s2 ", size_t " n );
29 .fi
30 .\"O .SH DESCRIPTION
31 .SH 説明
32 .\"O The
33 .\"O .BR wcsncmp ()
34 .\"O function is the wide-character equivalent of the
35 .\"O .BR strncmp (3)
36 .\"O function.
37 .\"O It compares the wide-character string pointed to by \fIs1\fP and the
38 .\"O wide-character string pointed to by \fIs2\fP, but at most \fIn\fP wide
39 .\"O characters from each string.
40 .\"O In each string, the comparison extends only up
41 .\"O to the first occurrence of a nulll wide character (L\(aq\\0\(aq), if any.
42 .BR wcsncmp ()
43 関数は、
44 .BR strncmp (3)
45 関数に対応するワイド文字関数である。
46 この関数は、\fIs1\fP が指すワイド文字文字列と \fIs2\fP が指すワイド文
47 字文字列を比較するが、最大でも先頭のワイド文字 \fIn\fP 個までしか比較
48 しない。またいずれかの文字列に NULL ワイド文字 (L\(aq\\0\(aq) が現れたら、
49 比較はその位置で終了する。
50 .\"O .SH "RETURN VALUE"
51 .SH 返り値
52 .\"O The
53 .\"O .BR wcsncmp ()
54 .\"O function returns zero if the wide-character strings at
55 .\"O \fIs1\fP and \fIs2\fP, truncated to at most length \fIn\fP, are equal.
56 .\"O It returns an integer greater than zero if at the first differing position
57 .\"O \fIi\fP (\fIi\fP < \fIn\fP),
58 .\"O the corresponding wide-character \fIs1[i]\fP is
59 .\"O greater than \fIs2[i]\fP.
60 .\"O It returns an integer less than zero if at the first
61 .\"O differing position \fIi\fP (\fIi\fP < \fIn\fP), the corresponding
62 .\"O wide-character \fIs1[i]\fP is less than \fIs2[i]\fP.
63 .BR wcsncmp ()
64 関数は、\fIs1\fP と \fIs2\fP がそれぞれ指す文字列を
65 \fIn\fP 文字に収まるように切り詰めたものが等しければ 0 を返す。
66 この関数は、異なる文字が最初に現われた位置 \fIi\fP (\fIi\fP < \fIn\fP)
67 において、その位置にある文字 \fIs1[i]\fP が \fIs2[i]\fP より大きければ
68 正の値を返す。異なる文字が最初に現われた位置 \fIi\fP (\fIi\fP < \fIn\fP)
69 において、その位置にある文字 \fIs1[i]\fP が \fIs2[i]\fP より小さければ
70 負の値を返す。
71 .\"O .SH "CONFORMING TO"
72 .SH 準拠
73 C99.
74 .\"O .SH "SEE ALSO"
75 .SH 関連項目
76 .BR strncmp (3),
77 .BR wcsncasecmp (3)