File: stpncpy.3

package info (click to toggle)
manpages-fr 1.58.1-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 10,104 kB
  • ctags: 4
  • sloc: makefile: 106; sh: 8
file content (48 lines) | stat: -rw-r--r-- 1,727 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
.\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
.\"
.\" 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
.\" Corrected, aeb, 990824
.\" MJ 21/07/2003 LDP-1.56
.TH STPNCPY 3 "21 juillet 2003" LDP "Manuel du programmeur Linux"
.SH NOM
stpncpy \- Copier une chane et pointer sur sa fin.
.SH SYNOPSIS
.nf
.B #include <string.h>
.sp
.BI "char *stpncpy (char *" dest ", const char *" src ", size_t " n );
.fi
.SH DESCRIPTION
La fonction \fBstpncpy\fP copie au plus \fIn\fP caractres depuis la chane
pointe par \fIsrc\fP, y compris le caractre final '\\0' dans le tableau
point par \fIdest\fP.  \fIn\fP caractres exactement sont crits dans
\fIdest\fP. Si la longueur \fIstrlen(src)\fP est plus petite que \fIn\fP, les
caractres restant dans le tableau point par \fIdest\fP sont mis  zro. Si la
longueur \fIstrlen(src)\fP est plus grande que \fIn\fP, la chane pointe par
\fIdest\fP ne sera
.B pas
termine par un caractre nul final.
.PP
Les chanes ne doivent
.B pas
se recouvrir.
.PP
Le programmeur doit s'assurer qu'il a rserv assez de mmoire pour au moins
\fIn\fP caractres.
.SH "VALEUR RENVOYE"
\fBstpncpy\fP renvoie un pointeur sur le caractre nul final dans
\fIdest\fP, ou si \fIdest\fP n'est pas un caractre nul final, \fIdest + n\fP.
.SH "CONFORMIT"
Cette fonction est une extension GNU.
.SH "VOIR AUSSI"
.BR strncpy (3)
.SH TRADUCTION
.RI "Thierry Vignaud <" tvignaud@mandrakesoft.com ">, 1999"
.br
Christophe Blaess, 2003.