weixinhum

截取指定字符串特定字符后的子字符串

CString cmyweburl = L"http://write.blog.csdn.net/postedit";//指定字符串
cmyweburl = cmyweburl.Right(cmyweburl.GetLength()-cmyweburl.ReverseFind(\'/\')-1);//利用CString类成员函数ReverseFind()查找字符‘/’,返回最后一个‘/’字符所在位置,经过计算得出特定字符后面子字符串长度,用成员函数Right()加以截取




分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-24
  • 2021-12-18
  • 2021-05-18
  • 2021-12-09
猜你喜欢
  • 2022-12-23
  • 2021-08-27
  • 2022-01-02
相关资源
相似解决方案