How does strtok() split the string into tokens in C?

前端 未结 15 2107
陌清茗
陌清茗 2020-11-22 14:48

Please explain to me the working of strtok() function. The manual says it breaks the string into tokens. I am unable to understand from the manual what it actua

15条回答
  •  广开言路
    2020-11-22 15:49

    strtok replaces the characters in the second argument with a NULL and a NULL character is also the end of a string.

    http://www.cplusplus.com/reference/clibrary/cstring/strtok/

提交回复
热议问题