MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/TriangleMeshDistance / WildcardPattern

Method WildcardPattern

tests/catch.hpp:12444–12457  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12442namespace Catch {
12443
12444 WildcardPattern::WildcardPattern( std::string const& pattern,
12445 CaseSensitive::Choice caseSensitivity )
12446 : m_caseSensitivity( caseSensitivity ),
12447 m_pattern( adjustCase( pattern ) )
12448 {
12449 if( startsWith( m_pattern, '*' ) ) {
12450 m_pattern = m_pattern.substr( 1 );
12451 m_wildcard = WildcardAtStart;
12452 }
12453 if( endsWith( m_pattern, '*' ) ) {
12454 m_pattern = m_pattern.substr( 0, m_pattern.size()-1 );
12455 m_wildcard = static_cast<WildcardPosition>( m_wildcard | WildcardAtEnd );
12456 }
12457 }
12458
12459 bool WildcardPattern::matches( std::string const& str ) const {
12460 switch( m_wildcard ) {

Callers

nothing calls this directly

Calls 4

startsWithFunction · 0.85
endsWithFunction · 0.85
substrMethod · 0.80
sizeMethod · 0.80

Tested by

no test coverage detected