MCPcopy Create free account
hub / github.com/OpenCppCoverage/OpenCppCoverage / Wildcards

Method Wildcards

CppCoverage/Wildcards.cpp:31–47  ·  view source on GitHub ↗

-------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

29
30 //-------------------------------------------------------------------------
31 Wildcards::Wildcards(std::wstring str, bool isRegexCaseSensitiv)
32 : originalStr_( str )
33 {
34 auto flags = (isRegexCaseSensitiv) ? std::regex::basic : std::regex::icase;
35 // Do not escaped '*'
36
37 for (auto c : EscapedChars)
38 {
39 std::wstring escapedString{ c };
40 boost::replace_all(str, escapedString, L"\\" + escapedString);
41 }
42
43 // remove useless *
44 boost::trim_if(str, [](wchar_t c){ return c == L'*';});
45 boost::replace_all(str, L"*", L".*");
46 wildcars_.assign(str, flags);
47 }
48
49 //-------------------------------------------------------------------------
50 Wildcards::Wildcards(Wildcards&& wildcards)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected