tokens
Divide um texto usando separadores e fornece seus pedaços
Seqüência de Chamamento
Chunks = tokens(text) Chunks = tokens(text, separators)
Parâmetros
- text
- Um único texto a ser dividido. Pode incluir caracteres internacionais UTF-8 estendidos.
- separators
- Vetor de caracteres. Valor padrão =
[" ",ascii(9)], ascii(9) sendo a tabulação horizontal. - Chunks
- Vetor da coluna: partes do texto dividido.
Descrição
tokens(…) pesquisa no texto os separadores fornecidos,
e divide em pedaços. Os pedaços são sem separadores.
Separadores consecutivos são mesclados.
Exemplos
tokens("The given text") tokens("SCI/demos/scicos", "/")' tokens("Επιστήμη και καινοτομία", ["α"," "])' nbsp = ascii(160); // non-breakable space t = "the" + nbsp + "given text" tokens(t)
--> tokens('The given text')
ans =
"The"
"given"
"text"
--> tokens('SCI/demos/scicos', '/')'
ans =
"SCI" "demos" "scicos"
--> tokens("Επιστήμη και καινοτομία", ["α"," "])'
ans =
"Επιστήμη" "κ" "ι" "κ" "ινοτομί"
--> nbsp = ascii(160); // non-breakable space
--> t = "the" + nbsp + "given text"
t =
"the given text"
--> tokens(t)
ans =
"the given"
"text"
Ver Também
| Report an issue | ||
| << tokenpos | Cadeias de Caracteres (Strings) | Manipulação de Arquivos de Som >> |