int SplitString(const CString str, char split, CStringArray &strArray) { strArray.RemoveAll(); CString strTemp = str; int iIndex = 0; while (1) { iIndex = strTemp.Find(split); if(iIndex >= 0) { strArray.Add(strTemp.Left(iIndex)); strTemp = strTemp.Right(strTemp.GetLength()-iIndex-1); } else { break; } } strArray.Add(strTemp); return strArray.GetSize(); }
CString实现对特定字符串如#、&字符串的分割
猜你喜欢
转载自blog.csdn.net/q357010621/article/details/79901293
今日推荐
周排行