博客
关于我
按照分号分割字符串
阅读量:146 次
发布时间:2019-02-28

本文共 408 字,大约阅读时间需要 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/

你可能感兴趣的文章
nginx工作笔记005---nginx配置负载均衡_在微服务中实现网关集群_实现TCP传输层协议__http协议的负载均衡
查看>>
nginx常用命令及简单配置
查看>>
Nginx常用屏蔽规则,让网站更安全
查看>>
Nginx常见问题
查看>>
nginx平滑升级解决 nginx 安全漏洞(CVE-2021-23017)和NGINX 环境问题漏洞(CVE-2019-20372)
查看>>
Nginx平滑添加模块
查看>>
Nginx开启gzip网页传输压缩配置
查看>>
nginx开机启动脚本
查看>>
nginx异常:the “ssl“ parameter requires ngx_http_ssl_module in /usr/local/nginx/conf
查看>>