Top "Strtok" questions

strtok() is a Standard C (ISO 9899:1989) function for splitting a string in tokens.

How does strtok() split the string into tokens in C?

Please explain to me the working of strtok() function. The manual says it breaks the string into tokens. I am …

c string split token strtok
How to split a string to 2 strings in C

I was wondering how you could take 1 string, split it into 2 with a delimiter, such as space, and assign the 2 …

c string strtok
Split string into tokens and save them in an array

How to split a string into an tokens and then save them in an array? Specifically, I have a string "…

c split strtok
Using strtok with a std::string

I have a string that I would like to tokenize. But the C strtok() function requires my string to be …

c++ strtok
C: correct usage of strtok_r

How can I use strtok_r instead of strtok to do this? char *pchE = strtok(NULL, " "); Now I'm trying to …

c char strtok
Converting Char * to Uppercase in C

I'm trying to convert a char * to uppercase in c, but the function toupper() doesn't work here. I'm trying to …

c string pointers strtok
How to use strtok()

I'm writing a C program to study the usage of function strtok(). Here is my code: #include <stdio.h&…

c printf token strtok
Using strtok in c

I need to use strtok to read in a first and last name and seperate it. How can I store …

c strtok
strtok() issue: If tokens are delimited by delimiters,why is last token between a delimiter and the null '\0'?

In the following program, strtok() works as expected in the major part but I just can't comprehend the reason behind …

c token delimiter strtok
strtok segmentation fault

I am trying to understand why the following snippet of code is giving a segmentation fault: void tokenize(char* line) { …

c segmentation-fault strtok