MCPcopy Create free account
hub / github.com/RenderKit/oidn / WildcardPattern

Method WildcardPattern

external/catch.hpp:15389–15402  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15387namespace Catch {
15388
15389 WildcardPattern::WildcardPattern( std::string const& pattern,
15390 CaseSensitive::Choice caseSensitivity )
15391 : m_caseSensitivity( caseSensitivity ),
15392 m_pattern( normaliseString( pattern ) )
15393 {
15394 if( startsWith( m_pattern, '*' ) ) {
15395 m_pattern = m_pattern.substr( 1 );
15396 m_wildcard = WildcardAtStart;
15397 }
15398 if( endsWith( m_pattern, '*' ) ) {
15399 m_pattern = m_pattern.substr( 0, m_pattern.size()-1 );
15400 m_wildcard = static_cast<WildcardPosition>( m_wildcard | WildcardAtEnd );
15401 }
15402 }
15403
15404 bool WildcardPattern::matches( std::string const& str ) const {
15405 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