File: stpncpy.3

package info (click to toggle)
manpages-es 1.55-9
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 7,468 kB
  • ctags: 6
  • sloc: sh: 1,629; makefile: 64
file content (46 lines) | stat: -rw-r--r-- 1,696 bytes parent folder | download | duplicates (4)
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
.\" 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
.\"
.\" Translated Sun Apr 23 2000 by Juan Piernas <piernas@ditec.um.es>
.\"
.TH STPNCPY 3  "25 julio 1999" "GNU" "Manual del Programador de Linux"
.SH NOMBRE
stpncpy \- copia una cadena de tamaño fijo, devolviendo un puntero a su
final
.SH SINOPSIS
.nf
.B #include <string.h>
.sp
.BI "char *stpncpy (char *" dest ", const char *" src ", size_t " n );
.fi
.SH DESCRIPCIÓN
La función \fBstpncpy\fP copia, como mucho, \fIn\fP caracteres de la cadena
apuntada por \fIsrc\fP, incluyendo el carácter terminador '\\0', al array
apuntado por \fIdest\fP. Se escriben exactamente \fIn\fP caracteres en
\fIdest\fP. Si la longitud \fIstrlen(src)\fP es más pequeña que \fIn\fP, los
restantes caracteres del array apuntado por \fIdest\fP se rellenan con
caracteres '\\0'. Si la longitud \fIstrlen(src)\fP es mayor o igual que
\fIn\fP, la cadena apuntada por \fIdest\fP no terminará en '\\0'.
.PP
Las cadenas no deberían solaparse.
.PP
El programador debe garantizar que haya espacio para, al menos, \fIn\fP
caracteres en
\fIdest\fP.
.SH "VALOR DEVUELTO"
\fBstpncpy\fP devuelve un puntero al carácter nulo que termina la cadena
\fIdest\fP o, si \fIdest\fP no termina en nulo,
\fIdest + n\fP.
.SH "CONFORME A"
Esta función es una extensión de GNU.
.SH "VÉASE TAMBIÉN"
.BR strncpy (3)