Split C string into tokens using sscanf

后端 未结 3 1491
既然无缘
既然无缘 2020-12-19 09:37

I\'m trying to split a string into tokens but somewhat recursively. I am trying to parse:

\"content=0&website=Google\"

so that I have a

3条回答
  •  一生所求
    2020-12-19 09:44

    I recommend something similar to the following:

    char t_str[100];
    strncpy(t_str, contents, 100);
    //now strtok() on t_str, original contents will be preserved
    

提交回复
热议问题