std::vector<std::
string> Tools::SplitStr(
const char* baseStr,
const char*
rule)
{
log("baseStr: %s",baseStr);
std::vector<std::
string>
tempList;
std::string str;
char*
item;
item = strtok((
char*
)baseStr, rule);
while (item)
{
str =
item; log("item: %s", str.c_str());
tempList.push_back(str);
item =
strtok(NULL, rule);
}
return tempList;
}
转载于:https://www.cnblogs.com/JD85/p/4301485.html
相关资源:C语言字符串拆分成字符串数组.c
转载请注明原文地址: https://mac.8miu.com/read-72246.html