Tweak subsequence_match_smart_case
This commit is contained in:
parent
2a9875bd58
commit
94f4531bc8
|
@ -75,12 +75,11 @@ static bool subsequence_match_smart_case(StringView str, StringView subseq, int&
|
|||
index_sum = 0;
|
||||
auto it = str.begin();
|
||||
int index = 0;
|
||||
for (auto subseq_it = subseq.begin(); subseq_it != subseq.end();
|
||||
subseq_it = utf8::next(subseq_it, subseq.end()))
|
||||
for (auto subseq_it = subseq.begin(); subseq_it != subseq.end();)
|
||||
{
|
||||
if (it == str.end())
|
||||
return false;
|
||||
const Codepoint c = utf8::codepoint(subseq_it, subseq.end());
|
||||
const Codepoint c = utf8::read_codepoint(subseq_it, subseq.end());
|
||||
while (not smartcase_eq(c, utf8::read_codepoint(it, subseq.end())))
|
||||
{
|
||||
++index;
|
||||
|
|
Loading…
Reference in New Issue
Block a user