更新时间:2022-04-25 21:34:51
您可以使用其他字符串类提供的方法,例如std::wstring
.
例如(使用空格作为分隔符):
You may use the methods provided by another string class, for instancestd::wstring
.
e.g. (using a blank as delimiter):
bstr_t b = bstr_t(L"Hi folks");
wstring w = b;
wstring::size_type pos = w.find(L' ');
bstr_t b1 = w.substr(0, pos).c_str();
bstr_t b2 = w.substr(pos+1).c_str();
我认为此链接将为此提供一些良好的信息,并引导您进入分析服务公司.
http://www.johndcook.com/cplusplus_strings.html [
I think this link will provide some good information on this and will lead you to the anser.
http://www.johndcook.com/cplusplus_strings.html[^]
Good luck!