MCPcopy Create free account
hub / github.com/SOCI/soci / WildcardPattern

Method WildcardPattern

tests/catch.hpp:15402–15415  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected