41 if( commands.size() == 0
42 || commands.back().first != ASTERISK ) commands.emplace_back( ASTERISK,
nullptr );
56 if( commands.size() > 1
57 && (commands.end()-1)->first == ASTERISK )
61 if( commands.size() >= 2
62 && (commands.end()-2)->first > 0 )
64 (commands.end()-2)->first+= qtyQ;
68 commands.emplace( commands.end() - 1, qtyQ, nullptr );
73 commands.emplace_back( qtyQ,
nullptr );
79 while ( idx < parser.
Length() && parser[idx] !=
'*' && parser[idx] !=
'?' )
92 if( commands.size() == 0 )
100 size_t lastCmd=
static_cast<size_t>( commands.size() - 1 );
101 bool lastWasAsterisk=
false;
103 for( actCmd= 0; actCmd <= lastCmd ; ++actCmd )
105 auto& cmd= commands[actCmd];
110 if ( haystack.
Length() < cmd.first )
112 haystack.template ConsumeChars<false>( cmd.first );
117 if( cmd.first == ASTERISK )
119 if ( actCmd == lastCmd )
122 lastWasAsterisk=
true;
127 if( cmd.second.Length() > haystack.
Length() )
130 if( lastWasAsterisk )
133 : haystack.template IndexOf<false, lang::Case::Ignore >( cmd.second );
137 lastWasAsterisk=
false;
141 if( sensitivity==
lang::Case::Sensitive ? (!haystack.template StartsWith<false, lang::Case::Sensitive>( cmd.second ) )
142 : (!haystack.template StartsWith<false, lang::Case::Ignore >( cmd.second ) ) )
145 haystack.template ConsumeChars<false>( cmd.second.Length() );
148 return haystack.
IsEmpty() || lastWasAsterisk;