| 3479 | public: |
| 3480 | |
| 3481 | WildcardPattern( std::string const& pattern, CaseSensitive::Choice caseSensitivity ) |
| 3482 | : m_caseSensitivity( caseSensitivity ), |
| 3483 | m_wildcard( NoWildcard ), |
| 3484 | m_pattern( adjustCase( pattern ) ) |
| 3485 | { |
| 3486 | if( startsWith( m_pattern, '*' ) ) { |
| 3487 | m_pattern = m_pattern.substr( 1 ); |
| 3488 | m_wildcard = WildcardAtStart; |
| 3489 | } |
| 3490 | if( endsWith( m_pattern, '*' ) ) { |
| 3491 | m_pattern = m_pattern.substr( 0, m_pattern.size()-1 ); |
| 3492 | m_wildcard = static_cast<WildcardPosition>( m_wildcard | WildcardAtEnd ); |
| 3493 | } |
| 3494 | } |
| 3495 | virtual ~WildcardPattern(); |
| 3496 | virtual bool matches( std::string const& str ) const { |
| 3497 | switch( m_wildcard ) { |
nothing calls this directly
no test coverage detected