About 53 results
Open links in new tab
  1. 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 unable to understand from the manual what it actually does. I added watches on str and...

  2. Using strtok in c - Stack Overflow

    Jan 16, 2014 · I need to use strtok to read in a first and last name and seperate it. How can I store the names where I can use them idependently in two seperate char arrays? #include <stdio.h> …

  3. How does the strtok function in C work? - Stack Overflow

    The important corollary is that you cannot use strtok on a const char* "hello world"; type of string, since you will get an access violation when you modify contents of a const char* string. The "good" thing …

  4. What are the differences between strtok and strsep in C

    Aug 28, 2011 · Could someone explain me what differences there are between strtok() and strsep()? What are the advantages and disadvantages of them? And why would I pick one over the other one.

  5. Using strtok with a std::string - Stack Overflow

    Each call to strtok modifies strToken by inserting a null character after the token returned by that call. But this is not correct. Actually the function replaces the first occurrence of a separator character with …

  6. What's the difference between strtok and strtok_r in C?

    Mar 5, 2014 · 6 strtok save static pointer for reuse in the next time, when you give NULL as the first parameter, so you just can't parse 2 strings in parallel. In the strtok_r you give also the pointer, as out …

  7. c - How to use strtok () - Stack Overflow

    Sep 21, 2013 · I'm writing a C program to study the usage of function strtok(). Here is my code:

  8. What changes strtok_r () did over strtok ()? Result still looks the ...

    Nov 13, 2020 · This is not true. strtok_r(3) does change the original string, as strtok(3) did previously, what it does differently is to accept a pointer to char * from you, to store the information (the point it …

  9. How to use strtok in C properly so there is no memory leak?

    I am somewhat confused by what happens when you call strtok on a char pointer in C. I know that it modifies the contents of the string, so if I call strtok on a variable named 'line', its content w...

  10. c - Implementation of strtok () function - Stack Overflow

    Mar 9, 2015 · Implementation of strtok () function Asked 11 years ago Modified 3 years, 6 months ago Viewed 58k times