About 3,060,000 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. 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 …

  3. 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> …

  4. 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 …

  5. 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.

  6. 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:

  7. char - C: correct usage of strtok_r - Stack Overflow

    Apr 12, 2013 · char *strtok_r(char *str, const char *delim, char **saveptr); The strtok_r () function is a reentrant version strtok (). The saveptr argument is a pointer to a char * variable that is used …

  8. c - Implicit Declaration of Function ‘strtok_r’ Despite Including ...

    Regarding your implicit declaration, strtok_r should be brought in correctly using string.h, but it is a POSIX-2001 feature, and you should ensure it is included. Either #define _POSIX_C_SOURCE …

  9. c - Why do we use NULL in strtok ()? - Stack Overflow

    May 4, 2014 · 44 strtok is part of the C library and what it does is splitting a C null-delimited string into tokens separated by any delimiter you specify. The first call to strtok must pass the C string to …

  10. 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...