Split C string into tokens using sscanf

后端 未结 3 1508
既然无缘
既然无缘 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 10:07

    scanf is more primitive than you seem to think — %s will match everything up to the next whitespace. Your best solution is probably to stick with strtok but throw it only content you've strduped from the authoritative original.

提交回复
热议问题