MCPcopy Create free account
hub / github.com/apache/thrift / WildcardPattern

Method WildcardPattern

compiler/cpp/tests/catch/catch.hpp:3563–3576  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3561 public:
3562
3563 WildcardPattern( std::string const& pattern, CaseSensitive::Choice caseSensitivity )
3564 : m_caseSensitivity( caseSensitivity ),
3565 m_wildcard( NoWildcard ),
3566 m_pattern( adjustCase( pattern ) )
3567 {
3568 if( startsWith( m_pattern, '*' ) ) {
3569 m_pattern = m_pattern.substr( 1 );
3570 m_wildcard = WildcardAtStart;
3571 }
3572 if( endsWith( m_pattern, '*' ) ) {
3573 m_pattern = m_pattern.substr( 0, m_pattern.size()-1 );
3574 m_wildcard = static_cast<WildcardPosition>( m_wildcard | WildcardAtEnd );
3575 }
3576 }
3577 virtual ~WildcardPattern();
3578 virtual bool matches( std::string const& str ) const {
3579 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