C++ CString字符串操作

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

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




原文地址:https://www.cnblogs.com/weixinhum/p/3916701.html