本文共 411 字,大约阅读时间需要 1 分钟。
CString temp; vectorv1 str.Replace(_T(";"), _T(";"));//防止中英文分号混淆,统一把英文分号替换成中文分号 int bj = 0; int ej = 0; while (ej = str.Find(_T(";"), bj)) { if (ej < 1) { if (bj <= str.GetLength())//排除末尾没加分号的情况 { temp =str.Mid(bj, str.GetLength()); v1.push_back(temp); } break; } temp = str.Mid(bj, ej - bj); v1.push_back(temp); bj = ej + 1; ej = 0; }
转载地址:http://liyc.baihongyu.com/