Using sscanf for the dynamic delimiters (inputted by users) in parsing an input string in C? [migrated]
- by Zuhakasa
I'm encountering a problem in parsing a string using sscanf() function.
My function gets 2 string parameters. One for input string and another one for a dynamic list of delimiters. How can I use sscanf to parse the input string with the defined delimiters inputted by users.
For example:
Myfunction(char * input_string, char * delimiter_list){
scanf("%s", input_string);
scanf("%s", delimiter_list);
sscanf(input_string, ???...);
................
}