MCPcopy Create free account
hub / github.com/Profactor/cv-plot / WildcardPattern

Method WildcardPattern

CvPlot/ext/catch2/inc/catch.hpp:15063–15076  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15061namespace Catch {
15062
15063 WildcardPattern::WildcardPattern( std::string const& pattern,
15064 CaseSensitive::Choice caseSensitivity )
15065 : m_caseSensitivity( caseSensitivity ),
15066 m_pattern( normaliseString( pattern ) )
15067 {
15068 if( startsWith( m_pattern, '*' ) ) {
15069 m_pattern = m_pattern.substr( 1 );
15070 m_wildcard = WildcardAtStart;
15071 }
15072 if( endsWith( m_pattern, '*' ) ) {
15073 m_pattern = m_pattern.substr( 0, m_pattern.size()-1 );
15074 m_wildcard = static_cast<WildcardPosition>( m_wildcard | WildcardAtEnd );
15075 }
15076 }
15077
15078 bool WildcardPattern::matches( std::string const& str ) const {
15079 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