How do I parse a token from a string in C?
问题 How do i parse tokens from an input string. For example: char *aString = "Hello world". I want the output to be: "Hello" "world" 回答1: You are going to want to use strtok - here is a good example. 回答2: Take a look at strtok, part of the standard library. 回答3: strtok is the easy answer, but what you really need is a lexer that does it properly. Consider the following: are there one or two spaces between "hello" and "world"? could that in fact be any amount of whitespace? could that include