MCPcopy Create free account
hub / github.com/cirquit/trdrop / WildcardPattern

Method WildcardPattern

ext/catch.hpp:3481–3494  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3479 public:
3480
3481 WildcardPattern( std::string const& pattern, CaseSensitive::Choice caseSensitivity )
3482 : m_caseSensitivity( caseSensitivity ),
3483 m_wildcard( NoWildcard ),
3484 m_pattern( adjustCase( pattern ) )
3485 {
3486 if( startsWith( m_pattern, '*' ) ) {
3487 m_pattern = m_pattern.substr( 1 );
3488 m_wildcard = WildcardAtStart;
3489 }
3490 if( endsWith( m_pattern, '*' ) ) {
3491 m_pattern = m_pattern.substr( 0, m_pattern.size()-1 );
3492 m_wildcard = static_cast<WildcardPosition>( m_wildcard | WildcardAtEnd );
3493 }
3494 }
3495 virtual ~WildcardPattern();
3496 virtual bool matches( std::string const& str ) const {
3497 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