// 字符串分割
const std::vector<std::string> SplitString(const std::string& strSrc, const std::string& pattern)
{
std::string str = strSrc;
std::string::size_type pos;
std::vector<std::string> vecStr;
str += pattern; //扩展字符串以方便操作
std::size_t iSize = str.size();
for (size_t i = 0; i < iSize; i++)
{
pos = str.find(pattern, i);
if (pos < iSize)
{
string strSub = str.substr(i, pos - i);
vecStr.emplace_back(strSub);
i = pos + pattern.size() - 1;
}
}
return vecStr;
}