.\" Copyright (c) Bruno Haible .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as .\" published by the Free Software Foundation; either version 2 of .\" the License, or (at your option) any later version. .\" .\" References consulted: .\" GNU glibc-2 source code and manual .\" Dinkumware C library reference http://www.dinkumware.com/ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" .\" About this Japanese page, please contact to JM Project .\" Translated Wed Oct 27 02:17:42 JST 1999 .\" by FUJIWARA Teruyoshi .\" .TH WCPNCPY 3 2010-09-15 "GNU" "Linux Programmer's Manual" .\"O .SH NAME .SH 名前 .\"O wcpncpy \- copy a fixed-size string of wide characters, .\"O returning a pointer to its end wcpncpy \- 固定長のワイド文字文字列をコピーし、その末尾を指すポインタを返す .\"O .SH SYNOPSIS .SH 書式 .nf .B #include .sp .BI "wchar_t *wcpncpy(wchar_t *" dest ", const wchar_t *" src ", size_t " n ); .fi .sp .in -4n .\"O Feature Test Macro Requirements for glibc (see .\"O .BR feature_test_macros (7)): glibc 向けの機能検査マクロの要件 .RB ( feature_test_macros (7) 参照): .in .sp .BR wcpncpy (): .PD 0 .ad l .RS 4 .TP 4 .\"O Since glibc 2.10: glibc 2.10 以降: _XOPEN_SOURCE\ >=\ 700 || _POSIX_C_SOURCE\ >=\ 200809L .TP .\"O Before glibc 2.10: glibc 2.10 より前: _GNU_SOURCE .RE .ad .PD .\"O .SH DESCRIPTION .SH 説明 .\"O The .\"O .BR wcpncpy () .\"O function is the wide-character equivalent .\"O of the .\"O .BR stpncpy (3) .\"O function. .\"O It copies at most \fIn\fP wide characters from the wide-character .\"O string pointed to by \fIsrc\fP, .\"O including the terminating L\(aq\\0\(aq character, .\"O to the array pointed to by \fIdest\fP. .\"O Exactly \fIn\fP wide characters are .\"O written at \fIdest\fP. .\"O If the length \fIwcslen(src)\fP is smaller than \fIn\fP, .\"O the remaining wide characters in the array pointed to .\"O by \fIdest\fP are filled with L\(aq\\0\(aq characters. .\"O If the length \fIwcslen(src)\fP is greater or equal .\"O to \fIn\fP, the string pointed to by \fIdest\fP will .\"O not be L\(aq\\0\(aq terminated. .BR wcpncpy () 関数は、 .BR stpncpy (3) 関数に対応するワイド文字関数である。 この関数は、\fIsrc\fP が指すワイド文字文字列から \fIdest\fP が指すワイド文字文字列 に、終端の L\(aq\\0\(aq を含めて最大 \fIn\fP 文字を コピーする。ちょうど \fIn\fP 個のワイド文字が \fIdest\fP にコピーされる。つまり、 \fIwcslen(src)\fP の長さが \fIn\fP より小さければ、\fIdest\fP が指す配 列中の残りのワイド文字は L\(aq\\0\(aq 文字で埋められる。もし \fIwcslen(src)\fP の長さが \fIn\fP 以上ならば、\fIdest\fP が指す文字列 は L\(aq\\0\(aq で終端しない。 .PP .\"O The strings may not overlap. 2 つの文字列は重なっていてはならない。 .PP .\"O The programmer must ensure that there is room for at least \fIn\fP wide .\"O characters at \fIdest\fP. プログラマは、少なくとも \fIn\fP 個のワイド文字を格納できる領域を \fIdest\fP に確保しなければならない。 .\"O .SH "RETURN VALUE" .SH 返り値 .\"O .BR wcpncpy () .\"O returns a pointer to the last wide character written, that is, .\"O \fIdest + n \- 1\fP. .BR wcpncpy () は、最後に書き込まれたワイド文字へのポインタ、 すなわち \fIdest + n \- 1\fP を返す。 .\"O .SH "CONFORMING TO" .SH 準拠 .\"O This function is a GNU extension. この関数は GNU 拡張である。 .\"O .SH "SEE ALSO" .SH 関連項目 .BR stpncpy (3), .BR wcsncpy (3), .BR feature_test_macros (7)