博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
按照分号分割字符串
阅读量:142 次
发布时间:2019-02-28

本文共 411 字,大约阅读时间需要 1 分钟。

CString temp;	vector
v1 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/

你可能感兴趣的文章