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

Method WildcardPattern

lib/catch2/catch.hpp:15400–15413  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15398namespace Catch {
15399
15400 WildcardPattern::WildcardPattern( std::string const& pattern,
15401 CaseSensitive::Choice caseSensitivity )
15402 : m_caseSensitivity( caseSensitivity ),
15403 m_pattern( normaliseString( pattern ) )
15404 {
15405 if( startsWith( m_pattern, '*' ) ) {
15406 m_pattern = m_pattern.substr( 1 );
15407 m_wildcard = WildcardAtStart;
15408 }
15409 if( endsWith( m_pattern, '*' ) ) {
15410 m_pattern = m_pattern.substr( 0, m_pattern.size()-1 );
15411 m_wildcard = static_cast<WildcardPosition>( m_wildcard | WildcardAtEnd );
15412 }
15413 }
15414
15415 bool WildcardPattern::matches( std::string const& str ) const {
15416 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