PathMatchSpec 匹配通配符的用法

这两天用MFC写一个文件自动备份的小程序,匹配文件扩展名时,想看看有没有现成的函数支持模糊匹配的,在看路径函数的时候看到 

 PathMatchSpec 感觉还蛮好用的,为防止以后忘记,现记录下来

这个函数不区分大小写,支持通配符 * ?

if (PathMatchSpec(m_path, _T("*.q")))
{
	OutputDebugString(m_path);
}

if (PathMatchSpec(m_path, _T("?.qml")))
{
	OutputDebugString(m_path);
}


猜你喜欢

转载自blog.csdn.net/u011512808/article/details/53367542
今日推荐