1 .\" Hey Emacs! This file is -*- nroff -*- source.
3 .\" Copyright 1995 James R. Van Zandt <jrv@vanzandt.mv.com>
5 .\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
6 .\" all rights reserved.
7 .\" Translated Fri Dec 26 13:14:47 JST 1997
8 .\" by HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
10 .\" Permission is granted to make and distribute verbatim copies of this
11 .\" manual provided the copyright notice and this permission notice are
12 .\" preserved on all copies.
14 .\" Permission is granted to copy and distribute modified versions of this
15 .\" manual under the conditions for verbatim copying, provided that the
16 .\" entire resulting derived work is distributed under the terms of a
17 .\" permission notice identical to this one.
19 .\" Since the Linux kernel and libraries are constantly changing, this
20 .\" manual page may be incorrect or out-of-date. The author(s) assume no
21 .\" responsibility for errors or omissions, or for damages resulting from
22 .\" the use of the information contained herein. The author(s) may not
23 .\" have taken the same level of care in the production of this manual,
24 .\" which is licensed free of charge, as they might when working
27 .\" Formatted or processed versions of this manual, if unaccompanied by
28 .\" the source, must acknowledge the copyright and authors of this work.
30 .TH STPCPY 3 2011-09-28 "GNU" "Linux Programmer's Manual"
32 stpcpy \- 文字列をコピーし、コピーした文字列の終りへのポインタを返す
35 .B #include <string.h>
37 .BI "char *stpcpy(char *" dest ", const char *" src );
42 .RB ( feature_test_macros (7)
52 _XOPEN_SOURCE\ >=\ 700 || _POSIX_C_SOURCE\ >=\ 200809L
61 関数は、\fIsrc\fP で指された文字列を (文字列を終端する NULL バイト
62 (\(aq\\0\(aq) を含めて) \fIdest\fP で指された配列にコピーする。
63 文字列は重複してはならず、コピー先の文字列 \fIdest\fP はコピーを受け取る
67 は、文字列 \fIdest\fP の始まりではなく
68 \fB終り\fPを指すポインタ (すなわち、文字列を終端する NULL バイト) を返す。
70 この関数は POSIX.1-2008 に追加された。
71 それ以前は、この関数は C や POSIX.1 標準の一部でも
72 UNIX システムの慣習的なものでもなかったが、
74 ひょっとしたら MS-DOS 由来のものかもしれない。
77 例として、このプログラムは \fBfoo\fP と \fBbar\fP を連結して \fBfoobar\fP
94 to = stpcpy(to, "foo");
95 to = stpcpy(to, "bar");
96 printf("%s\\n", buffer);