.\" -*- coding: UTF-8 -*- '\" t .\" Copyright (c) Bruno Haible .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" .\" References consulted: .\" 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 .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH wcstok 3 "20 ​​Julio 2023" "Páginas de manual de Linux 6.05.01" .SH NOMBRE wcstok \- divide una cadena de caracteres anchos en tokens .SH BIBLIOTECA Biblioteca Estándar C (\fIlibc\fP, \fI\-lc\fP) .SH SINOPSIS .nf \fB#include \fP .PP \fBwchar_t *wcstok(wchar_t *restrict \fP\fIwcs\fP\fB, const wchar_t *restrict \fP\fIdelim\fP\fB,\fP \fB wchar_t **restrict \fP\fIptr\fP\fB);\fP .fi .SH DESCRIPCIÓN La función \fBwcstok\fP() es el equivalente de caracteres anchos de la función \fBstrtok\fP(3), con el argumento añadido para hacerlo seguro en un entorno multihilo. Se puede usar para dividir una cadena de caracteres anchos \fIwcs\fP en tokens, donde un token se define como una subcadena que no contenga ningún carácter ancho de \fIdelim\fP. .PP The search starts at \fIwcs\fP, if \fIwcs\fP is not NULL, or at \fI*ptr\fP, if \fIwcs\fP is NULL. First, any delimiter wide\-characters are skipped, that is, the pointer is advanced beyond any wide\-characters which occur in \fIdelim\fP. If the end of the wide\-character string is now reached, \fBwcstok\fP() returns NULL, to indicate that no tokens were found, and stores an appropriate value in \fI*ptr\fP, so that subsequent calls to \fBwcstok\fP() will continue to return NULL. Otherwise, the \fBwcstok\fP() function recognizes the beginning of a token and returns a pointer to it, but before doing that, it zero\-terminates the token by replacing the next wide\-character which occurs in \fIdelim\fP with a null wide character (L\[aq]\e0\[aq]), and it updates \fI*ptr\fP so that subsequent calls will continue searching after the end of recognized token. .SH "VALOR DEVUELTO" La función \fBwcstok\fP() devuelve a un puntero al siguiente token, o NULL si no se encuentran más token. .SH ATRIBUTOS Para obtener una explicación de los términos usados en esta sección, véase \fBattributes\fP(7). .TS allbox; lbx lb lb l l l. Interfaz Atributo Valor T{ .na .nh \fBwcstok\fP() T} Seguridad del hilo Multi\-hilo seguro .TE .sp 1 .SH ESTÁNDARES C11, POSIX.1\-2008. .SH HISTORIAL POSIX.1\-2001, C99. .SH NOTAS La cadena de caracteres anchos original \fIwcs\fP se modifica de forma destructiva durante la operación. .SH EJEMPLOS El siguiente código realiza un bucle sobre los tokens contenidos en una cadena de caracteres anchos. .PP .EX wchar_t *wcs = ...; wchar_t *token; wchar_t *state; for (token = wcstok(wcs, L" \et\en", &state); token != NULL; token = wcstok(NULL, L" \et\en", &state)) { ... } .EE .SH "VÉASE TAMBIÉN" \fBstrtok\fP(3), \fBwcschr\fP(3) .PP .SH TRADUCCIÓN La traducción al español de esta página del manual fue creada por Pedro Pablo Fábrega y Juan Piernas . .PP Esta traducción es documentación libre; lea la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3 .UE o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD. .PP Si encuentra algún error en la traducción de esta página del manual, envíe un correo electrónico a .MT debian-l10n-spanish@lists.debian.org .ME .