MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / WildcardPattern

Method WildcardPattern

Source/ThirdParty/catch2/catch.hpp:15393–15406  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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