.\" -*- 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 julho 2023" "Linux man\-pages 6.05.01" .SH NOME wcstok \- separa uma string de caracteres largos em tokens .SH BIBLIOTECA Biblioteca C Padrão (\fIlibc\fP, \fI\-lc\fP) .SH SINOPSE .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 DESCRIÇÃO A função \fBwcstok\fP() é o equivalente de caracteres largos da função \fBstrtok\fP(), com um argumento adicional para torná\-la segura para multithread. Ela pode ser usada para separar uma string de caracteres largos \fIwcs\fP em tokens, onde um token é definido como uma substring que não contém nenhum dos caracteres largos 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 DE RETORNO" A função \fBwcstok\fP() retorna um ponteiro para o próximo token, ou NULO se nenhum token adicional foi encontrado. .SH ATRIBUTOS Para uma explicação dos termos usados nesta seção, consulte \fBattributes\fP(7). .TS allbox; lbx lb lb l l l. Interface Atributo Valor T{ .na .nh \fBwcstok\fP() T} Thread safety MT\-Safe .TE .sp 1 .SH PADRÕES C11, POSIX.1\-2008. .SH HISTÓRICO POSIX.1\-2001, C99. .SH NOTAS A string de caracteres largos original \fIwcs\fP é modificada destrutivamente durante a operação. .SH EXEMPLOS O seguinte código percorre os tokens contidos numa string de caracteres largos. .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 "VEJA TAMBÉM" \fBstrtok\fP(3), \fBwcschr\fP(3) .PP .SH TRADUÇÃO A tradução para português brasileiro desta página man foi criada por Felipe M Pereira , André Luiz Fassone e Rafael Fontenelle . . .PP Esta tradução é uma documentação livre; leia a .UR https://www.gnu.org/licenses/gpl-3.0.html Licença Pública Geral GNU Versão 3 .UE ou posterior para as condições de direitos autorais. Nenhuma responsabilidade é aceita. .PP Se você encontrar algum erro na tradução desta página de manual, envie um e-mail para .MT debian-l10n-portuguese@lists.debian.org a lista de discussão de tradutores .ME .