C語言字符串分割:strtok、strtok_r

頭文件include <string.h>linux 1、strtokwindows 原型安全 char *strtok(char s[], const char *delim); 參數與功能函數 分解字符串爲一組字符串。s爲要分解的字符串;delim爲分隔符字符串。this 例如:.net strtok("abc,def,ghi",",") 表示將字符串以逗號進行分割,最後能夠分割成爲abc d
相關文章
相關標籤/搜索