一、使用String类中的find和substr方法。
例如:将取字符串”J=CC122; Path=/; HttpOnly“中的“J=CC122”。
std::string strC = "J=CC122; Path=/; HttpOnly";
int dwIndex = strC.find(";");
strSub = strC.substr(0, dwIndex);
二、其它方法,待续......
一、使用String类中的find和substr方法。
例如:将取字符串”J=CC122; Path=/; HttpOnly“中的“J=CC122”。
std::string strC = "J=CC122; Path=/; HttpOnly";
int dwIndex = strC.find(";");
strSub = strC.substr(0, dwIndex);
二、其它方法,待续......