MCPcopy Create free account
hub / github.com/cinder/Cinder / WildcardPattern

Method WildcardPattern

test/unit/src/catch.hpp:15404–15417  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

endsWithFunction · 0.85
substrMethod · 0.80
startsWithFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected