How to replace a '%' character in CComBSTR with "%%"?
-
Hi I just wanted to replace a '%' character in CComBSTR with "%%". But the code does not support CString. The solution should be UNICODE support. Any methods to perform this operation ? Thanks In Advance. Babu
Today is a gift, that's why it is called the present.
-
Hi I just wanted to replace a '%' character in CComBSTR with "%%". But the code does not support CString. The solution should be UNICODE support. Any methods to perform this operation ? Thanks In Advance. Babu
Today is a gift, that's why it is called the present.
CComBSTR
does not have aReplace
method, but you could use a temporaryCString
to make the replacement.CString cstr(bstr.m_str);
cstr.Replace(L"%", L"%%");
bstr = cstr;«_Superman_» _I love work. It gives me something to do between weekends.