Espaços nominais
Variantes
Acções

strtok

Da cppreference.com
< c‎ | string‎ | byte

 
 
 
Cordas de terminação nula de bytes
Funções
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Manipulação personagem
Original:
Character manipulation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Conversões para formatos numéricos
Original:
Conversions to numeric formats
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Manipulação de cadeia
Original:
String manipulation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Exame String
Original:
String examination
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Manipulação de memória
Original:
Memory manipulation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Diversos
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
Definido no cabeçalho <string.h>
char* strtok( char* str, const char* delim );
Localiza o próximo token em um byte string terminada em nulo apontado por str. Os caracteres separadores são identificados por terminada com null byte string apontado por delim.
Original:
Finds the next token in a null-terminated byte string pointed to by str. The separator characters are identified by null-terminated byte string pointed to by delim.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Se str != NULL, a função procura para o primeiro caractere que é não separador. Este personagem é o começo do token. Em seguida, a função pesquisa para o personagem primeiro separador. Este personagem é o fim do token. Função termina e retorna NULL se final de str é encontrada antes do fim' token é encontrada. Caso contrário, um ponteiro para fim da token é salvo em um local estático para chamadas subseqüentes. Este personagem é então substituída por um NULL caracteres ea função retorna um ponteiro para o início do sinal.
Original:
If str != NULL, the function searches for the first character which is not separator. This character is the beginning of the token. Then the function searches for the first separator character. This character is the end of the token. Function terminates and returns NULL if end of str is encountered before end of the token is found. Otherwise, a pointer to end of the token is saved in a static location for subsequent invocations. This character is then replaced by a NULL-character and the function returns a pointer to the beginning of the token.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Se str == NULL, a função continua de onde saiu em chamada anterior. O comportamento é o mesmo que o ponteiro se previamente armazenado é passado como str.
Original:
If str == NULL, the function continues from where it left in previous invocation. The behavior is the same as if the previously stored pointer is passed as str.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Índice

[editar] Parâmetros

str -
ponteiro para o byte string terminada em nulo para tokenize
Original:
pointer to the null-terminated byte string to tokenize
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
delim -
ponteiro para o byte string terminada em nulo identificar delimitadores
Original:
pointer to the null-terminated byte string identifying delimiters
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Valor de retorno

Apontador para o início de um símbolo se o fim da cadeia não tenha sido encontrada. Caso contrário, retorna NULL>
Original:
Pointer to the beginning of a token if the end of string has not been encountered. Otherwise returns NULL>
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Nota

A função não é thread-safe.
Original:
The function is not thread safe.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Exemplo

[editar] Veja também