36 if( commands.size() == 0
37 || commands.back().first != ASTERISK ) commands.emplace_back( ASTERISK,
nullptr );
51 if( commands.size() > 1
52 && (commands.end()-1)->first == ASTERISK )
56 if( commands.size() >= 2
57 && (commands.end()-2)->first > 0 )
59 (commands.end()-2)->first+= qtyQ;
63 commands.emplace( commands.end() - 1, qtyQ,
nullptr );
68 commands.emplace_back( qtyQ,
nullptr );
74 while ( idx < parser.
Length() && parser[idx] !=
'*' && parser[idx] !=
'?' )
87 if( commands.size() == 0 )
95 size_t lastCmd= size_t( commands.size() - 1 );
96 bool lastWasAsterisk=
false;
98 for( actCmd= 0; actCmd <= lastCmd ; ++actCmd )
100 auto& cmd= commands[actCmd];
105 if ( haystack.
Length() < cmd.first )
107 haystack.template ConsumeChars<NC>( cmd.first );
112 if( cmd.first == ASTERISK )
114 if ( actCmd == lastCmd )
117 lastWasAsterisk=
true;
122 if( cmd.second.Length() > haystack.
Length() )
125 if( lastWasAsterisk )
128 : haystack.template IndexOf<NC, lang::Case::Ignore >( cmd.second, 0, haystack.
Length() - cmd.second.Length() + 1 );
132 lastWasAsterisk=
false;
136 if( sensitivity==
lang::Case::Sensitive ? (!haystack.template StartsWith<NC, lang::Case::Sensitive>( cmd.second ) )
137 : (!haystack.template StartsWith<NC, lang::Case::Ignore >( cmd.second ) ) )
140 haystack.template ConsumeChars<NC>( cmd.second.Length() );
143 return haystack.
IsEmpty() || lastWasAsterisk;