MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / WildcardPattern

Method WildcardPattern

Bcore/src/main/cpp/Dobby/tests/catch.hpp:10849–10859  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10847namespace Catch {
10848
10849WildcardPattern::WildcardPattern(std::string const &pattern, CaseSensitive::Choice caseSensitivity)
10850 : m_caseSensitivity(caseSensitivity), m_pattern(adjustCase(pattern)) {
10851 if (startsWith(m_pattern, '*')) {
10852 m_pattern = m_pattern.substr(1);
10853 m_wildcard = WildcardAtStart;
10854 }
10855 if (endsWith(m_pattern, '*')) {
10856 m_pattern = m_pattern.substr(0, m_pattern.size() - 1);
10857 m_wildcard = static_cast<WildcardPosition>(m_wildcard | WildcardAtEnd);
10858 }
10859}
10860
10861bool WildcardPattern::matches(std::string const &str) const {
10862 switch (m_wildcard) {

Callers

nothing calls this directly

Calls 4

startsWithFunction · 0.85
endsWithFunction · 0.85
substrMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected