LPCWSTR location_url;
m_spWebBrowser->get_LocationURL((BSTR*)&location_url);
如何比较 strstr
中的 LPCWSTR
与 const char *
?
示例:
if(strstr((location_url, ".html"))
最佳答案
您也可以将目标扩展名设置为宽字符串并使用 wcsstr
wchar_t* ext = L".html";
if (wcsstr(location_url, ext))
关于c++ - 如何比较 strstr(LPCWSTR, CHAR*);,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13249606/