LPCWSTR location_url;
m_spWebBrowser->get_LocationURL((BSTR*)&location_url);
我如何LPCWSTR
与const char *
in进行比较strstr
?
例子:
if(strstr((location_url, ".html"))
LPCWSTR location_url;
m_spWebBrowser->get_LocationURL((BSTR*)&location_url);
我如何LPCWSTR
与const char *
in进行比较strstr
?
例子:
if(strstr((location_url, ".html"))
您也可以将目标扩展设为宽字符串并使用wcsstr
wchar_t* ext = L".html";
if (wcsstr(location_url, ext))