MCPcopy Create free account
hub / github.com/FidoProject/Fido / WildcardPattern

Method WildcardPattern

tests/catch.h:3124–3137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3122 public:
3123
3124 WildcardPattern( std::string const& pattern, CaseSensitive::Choice caseSensitivity )
3125 : m_caseSensitivity( caseSensitivity ),
3126 m_wildcard( NoWildcard ),
3127 m_pattern( adjustCase( pattern ) )
3128 {
3129 if( startsWith( m_pattern, "*" ) ) {
3130 m_pattern = m_pattern.substr( 1 );
3131 m_wildcard = WildcardAtStart;
3132 }
3133 if( endsWith( m_pattern, "*" ) ) {
3134 m_pattern = m_pattern.substr( 0, m_pattern.size()-1 );
3135 m_wildcard = static_cast<WildcardPosition>( m_wildcard | WildcardAtEnd );
3136 }
3137 }
3138 virtual ~WildcardPattern();
3139 virtual bool matches( std::string const& str ) const {
3140 switch( m_wildcard ) {

Callers

nothing calls this directly

Calls 3

startsWithFunction · 0.85
endsWithFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected