MFC字符串CString分割函数 简洁
介绍:
适用于.txt、.dat文件读取后运用字符串分割函数
这是我目前找得到的最简单的CString字符串分割函数
//***********************************
//字符分割函数
//***********************************
int Do::Div(const CString strLine, char split, CStringArray &strArray)
{
strArray.RemoveAll();//自带清空属性
CString temp = strLine;
int tag = 0;
while (1)
{
tag = temp.Find(split);
if (tag >= 0)
{
strArray.Add(temp.Left(tag))