在 C 语言中拆分数组中的字符串并将其放入字符串数组的最简单方法是什么。
例如
["this is a test", "this is also a test"]
进入
[["this", "is", "a", "test"], ["this", "is", "also", "a", "test"]]
最佳答案
使用 C 库中的 strtok
函数。该函数将字符串拆分为一系列标记。
关于c - 拆分数组中的字符串并将其放入 C 中的字符串数组的最简单方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26084465/