Chapter

Tokenizing

From ComputerScienceOne by Dr Chris Bourke

Concepts

  1. How do sscanf() and sprintf() work with strings?

    "The sscanf() function differs in its first argument: the string that contains the value you want to parse. Otherwise, the second two arguments are as in scanf(): the format (as a string) and the vari

  2. How can strtok() split a string into tokens?

    "Recall that tokenizing is the process of splitting up a string along some delimiter. For example, the comma delimited string, \"Smith,Joe,12345678,1985-09-08\" contains four pieces of data delimited

  3. Why is strtok() not reentrant, and what alternative does C provide?

    "It should be noted that strtok() is not reentrant. It can only work on one string at a time. In a multithreaded application, two threads cannot both use strtok() or they would end up processing each

Tokenizing | ComputerScienceOne | Bifalgorithm | Bifalgorithm