File: mblen.3

package info (click to toggle)
manpages-es 1.55-10
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch, wheezy
  • size: 7,464 kB
  • ctags: 6
  • sloc: sh: 1,623; makefile: 63
file content (66 lines) | stat: -rw-r--r-- 2,956 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
.\" 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:
.\" Modified Sat Jul 24 18:59:43 1993 by Rik Faith (faith@cs.unc.edu)
.\"   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
.\"   ISO/IEC 9899:1999
.\"
.\" Translated into Spanish Tue Mar  3 10:51:53 CET 1998 by Gerardo
.\" Aburruzaga García <gerardo.aburruzaga@uca.es>
.\" Traslation revised Sun Aug  6 2000 by Juan Piernas <piernas@ditec.um.es>
.\"
.TH MBLEN 3  "25 julio 1999" "GNU" "Manual del Programador de Linux"
.SH NOMBRE
mblen \- determina el número de bytes del siguiente carácter multibyte
.SH SINOPSIS
.nf
.B #include <stdlib.h>
.sp
.BI "int mblen (const char *" s ", size_t " n );
.fi
.SH DESCRIPCIÓN
Si \fIs\fP no es un puntero NULL, la función \fBmblen\fP inspecciona, como
mucho, \fIn\fP bytes de la cadena multibyte que comienza en \fIs\fP y extrae
el siguiente carácter multibyte completo. Usa un estado de cambios anónimo
y privado sólo conocido por la función mblen. Si el carácter multibyte no
esl el carácter ancho nulo, devuelve el número de bytes que se han consumido
de \fIs\fP. Si el carácter multibyte es el carácter ancho nulo, devuelve 0.
.PP
Si los \fIn\fP bytes a partir de \fIs\fP no contienen un carácter multibyte
completo, \fBmblen\fP devuelve \fI-1\fP. Esto puede ocurrir incluso si
\fIn\fP >= \fIMB_CUR_MAX\fP, si la cadena multibyte contiene secuencias de
cambios redundantes.
.PP
Si la cadena multibyte \fIs\fP contiene una secuencia multibyte inválida
antes del siguiente carácter completo, \fBmblen\fP también devuelve
\fI-1\fP.
.PP
Si \fIs\fP no es un puntero NULL, la función \fBmblen\fP
.\" The Dinkumware doc and the Single Unix specification say this, but
.\" glibc doesn't implement this.
devuelve el estado de cambios, sólo conocido por esta función, a su estado
inicial, y devuelve un valor distinto de cero si la condificación posee un
estado de cambios no trivial o cero si es una codificación sin estado.
.SH "VALOR DEVUELTO"
La función \fBmblen\fP devuelve el número de bytes recorridos de la
secuencia multibyte \fIs\fP, si encuentra un carácter ancho no nulo.
Devuelve 0 si encuentra un carácter ancho nulo. Devuelve -1 si
encuentra una secuencia mulitbyte inválida o si no pudo recorrer un carácter
multibyte completo.
.SH "CONFORME A"
ISO/ANSI C, UNIX98
.SH "VÉASE TAMBIÉN"
.BR mbrlen (3)
.SH OBSERVACIONES
El comportamiento de \fBmblen\fP depende de la categoría LC_CTYPE de la
localización actual.
.PP
La función \fBmbrlen\fP proporciona una interfaz mejor con la misma
funcionalidad.