CString种//使用Mid是啥作用

CString类//使用Mid是啥作用?CString openStropenStr.Format(_T(http://192.168.1.85/-wvhttp-01-/open.

CString类//使用Mid是啥作用?


CString openStr;
openStr.Format(_T("http://192.168.1.85/-wvhttp-01-/open.cgi");

int f = openStr.Find('\n');
CString tmpS = openStr.Mid(0, f);

int g = tmpS.Find('=');
CString connectID = tmpS.Mid(g + 1, tmpS.GetLength() - 1);

[解决办法]
openStr.Mid(0, f);
从位置0开始长度为f的openStr的子串