| 3561 | public: |
| 3562 | |
| 3563 | WildcardPattern( std::string const& pattern, CaseSensitive::Choice caseSensitivity ) |
| 3564 | : m_caseSensitivity( caseSensitivity ), |
| 3565 | m_wildcard( NoWildcard ), |
| 3566 | m_pattern( adjustCase( pattern ) ) |
| 3567 | { |
| 3568 | if( startsWith( m_pattern, '*' ) ) { |
| 3569 | m_pattern = m_pattern.substr( 1 ); |
| 3570 | m_wildcard = WildcardAtStart; |
| 3571 | } |
| 3572 | if( endsWith( m_pattern, '*' ) ) { |
| 3573 | m_pattern = m_pattern.substr( 0, m_pattern.size()-1 ); |
| 3574 | m_wildcard = static_cast<WildcardPosition>( m_wildcard | WildcardAtEnd ); |
| 3575 | } |
| 3576 | } |
| 3577 | virtual ~WildcardPattern(); |
| 3578 | virtual bool matches( std::string const& str ) const { |
| 3579 | switch( m_wildcard ) { |
nothing calls this directly
no test coverage detected