打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
分割字符串

从strFont= L"星期日,星期一,星期二,星期三,星期四,星期五,星期六"中分割出"星期日"至"星期六".

tstring CWidget::SplitFont(tstring strFont, int iFontIndex)
{
     if (tstring::npos != strFont.find(L","))
    {
          for (int i = 0;i < iFontIndex;i++)
         { 
                 int iBeginPos = strFont.find(L",");
                if (iBeginPos != tstring::npos )
                {
                      strFont = strFont.substr(iBeginPos+1);
                }
         }
         if (tstring::npos != strFont.find(L","))
         {
                int iEndPos = strFont.find(L",");
                strFont = strFont.substr(0,iEndPos);
         }
     }
     return strFont;
}
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
C++ 笔试基础之 08 字符串分割函数
string详解
Python 字符串操作方法大全
C++ string类
web信息的搜集---StrFun.h+StrFun.cpp
截取字符串
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服