1 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
3 .\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA)
4 .\" This is free documentation; you can redistribute it and/or
5 .\" modify it under the terms of the GNU General Public License as
6 .\" published by the Free Software Foundation; either version 2 of
7 .\" the License, or (at your option) any later version.
10 .\" References consulted:
11 .\" GNU glibc-2 source code and manual
13 .\" Corrected, aeb, 990824
14 .\"*******************************************************************
16 .\" This file was generated with po4a. Translate the source file.
18 .\"*******************************************************************
20 .\" Japanese Version Copyright (c) 1999 HANATAKA Shinya
21 .\" all rights reserved.
22 .\" Translated Tue Jan 11 00:55:50 JST 2000
23 .\" by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
25 .TH STPNCPY 3 2014\-05\-10 GNU "Linux Programmer's Manual"
27 stpncpy \- 固定長の文字列をコピーして、その最後へのポインターを返す
30 \fB#include <string.h>\fP
32 \fBchar *stpncpy(char *\fP\fIdest\fP\fB, const char *\fP\fIsrc\fP\fB, size_t \fP\fIn\fP\fB);\fP
36 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照):
45 _XOPEN_SOURCE\ >=\ 700 || _POSIX_C_SOURCE\ >=\ 200809L
53 \fBstpncpy\fP() 関数は \fIsrc\fP が指している文字列から終端のヌルバイト (\(aq\e0\(aq) を含めて最大 \fIn\fP バイトを
54 \fIdest\fP にコピーする。長さ \fIstrlen(src)\fP が \fIn\fP より小さい場合には \fIdest\fP の残りの 部分にはヌルバイト
55 (\(aq\e0\(aq) 文字が埋められる。 長さ \fIstrlen(src)\fP が \fIn\fP 以上ならば、 \fIdest\fP
60 プログラマーは \fIdest\fP に少なくとも \fIn\fP バイトの空きがあることを 保証しなければならない。
62 \fBstpncpy\fP() は \fIdest\fP の終端のヌルバイトを指すポインターを返すか、 \fIdest\fP がヌルバイトで終端されていない場合には
63 \fIdest\fP+\fIn\fP を返す。
65 .SS "マルチスレッディング (pthreads(7) 参照)"
66 \fBstpncpy\fP() 関数はスレッドセーフである。
68 This function was added to POSIX.1\-2008. Before that, it was a GNU
69 extension. It first appeared in version 1.07 of the GNU C library in 1993.
71 \fBstrncpy\fP(3), \fBwcpncpy\fP(3)
73 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.67 の一部
74 である。プロジェクトの説明とバグ報告に関する情報は
75 http://www.kernel.org/doc/man\-pages/ に書かれている。