Exemplo n.º 1
0
 wildcard_matcher_t(const wchar_t * /*argv0*/, const wchar_t *pattern, const options_t &opts,
                    io_streams_t &streams)
     : string_matcher_t(opts, streams), wcpattern(parse_util_unescape_wildcards(pattern)) {
     if (opts.ignore_case) {
         for (size_t i = 0; i < wcpattern.length(); i++) {
             wcpattern[i] = towlower(wcpattern[i]);
         }
     }
     if (opts.entire && !wcpattern.empty()) {
         if (wcpattern.front() != ANY_STRING) wcpattern.insert(0, 1, ANY_STRING);
         if (wcpattern.back() != ANY_STRING) wcpattern.push_back(ANY_STRING);
     }
 }