MCPcopy Create free account
hub / github.com/RenderKit/embree / WildcardPattern

Method WildcardPattern

tutorials/external/catch.hpp:12716–12729  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12714namespace Catch {
12715
12716 WildcardPattern::WildcardPattern( std::string const& pattern,
12717 CaseSensitive::Choice caseSensitivity )
12718 : m_caseSensitivity( caseSensitivity ),
12719 m_pattern( adjustCase( pattern ) )
12720 {
12721 if( startsWith( m_pattern, '*' ) ) {
12722 m_pattern = m_pattern.substr( 1 );
12723 m_wildcard = WildcardAtStart;
12724 }
12725 if( endsWith( m_pattern, '*' ) ) {
12726 m_pattern = m_pattern.substr( 0, m_pattern.size()-1 );
12727 m_wildcard = static_cast<WildcardPosition>( m_wildcard | WildcardAtEnd );
12728 }
12729 }
12730
12731 bool WildcardPattern::matches( std::string const& str ) const {
12732 switch( m_wildcard ) {

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected