bool Glob::RequiresEscape()

in src/vswhere.lib/Glob.cpp [222:247]


bool Glob::RequiresEscape(_In_ const wchar_t ch)
{
    static const wchar_t escape[] =
    {
        L'.',
        L'(',
        L')',
        L'$',
        L'[',
        L']',
        L'{',
        L'}',
        L'+',
    };
    static const size_t escape_len = sizeof(escape) / sizeof(*escape);

    for (unsigned char i = 0; i < escape_len; ++i)
    {
        if (ch == escape[i])
        {
            return true;
        }
    }

    return false;
}