MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / FileWildcardMatch

Method FileWildcardMatch

Util/src/StringUtil.cpp:136–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134};
135
136bool string_util::FileWildcardMatch(std::string_view sourceFile, std::string_view pattern) {
137 equal_to eq;
138
139 auto minSize = std::min(sourceFile.size(), pattern.size());
140 bool match = true;
141 for (std::size_t i = 0; i != minSize; i++) {
142 if (!eq(sourceFile[i], pattern[i])) {
143 match = false;
144 break;
145 }
146 }
147
148 if (!match) {
149 match = wildcards::match(sourceFile, pattern, eq).res;
150 }
151 return match;
152}
153
154// glibc
155int __strncasecmp(const char *s1, const char *s2, int n) {

Callers

nothing calls this directly

Calls 2

matchFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected