Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.1.0 - Português

Change language to:
English - Français - 日本語 - Русский

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
See the recommended documentation of this function

Ajuda do Scilab >> Cadeias de Caracteres (Strings) > strtok

strtok

divide um string em fichas (tokens)

Seqüência de Chamamento

res = strtok(str,delimiters)

Parâmetros

str

string

delimiters

string

res

string

Descrição

res = strtok(str,delimiters) divide str em fichas, que são seqüências de caracteres contíguos separados por qualquer um dos caracteres que fazem parte do string delimiters (delimiters = delimitadores).

Exemplos

TOKENS = [];
token = strtok("Um string de ,,fichas e algumas fichas mais"," ,");
TOKENS = [TOKENS,token];
while( token <> '' )
  token = strtok(" ,");
  TOKENS = [TOKENS,token];
end
disp(TOKENS);

Ver Também

  • strrchr — acha a última ocorrência de um caractere em um string
  • strchr — acha a primeira ocorrência de um caractere em um string
Report an issue
<< strtod Cadeias de Caracteres (Strings) tokenpos >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Tue Feb 25 08:52:32 CET 2020