Decompile fn_16210 (HighlightKeyword)
Batch #14004 by Yommy: 0 byte-identical, 1 confirmed by peer review. - fn_16210 HighlightKeyword: logic confirmed by peer review Peer-reviewed-by: secret, KWDev, codeplay Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
8ad44b8ae0
commit
aa99c11740
1 changed files with 4 additions and 4 deletions
|
|
@ -113,11 +113,11 @@ int HighlightKeyword(std::string& text, std::string_view keyword, std::string_vi
|
|||
|
||||
std::size_t position = 0;
|
||||
while ((position = lowerText.find(lowerKeyword, position)) != std::wstring::npos) {
|
||||
lowerText.insert(position, widePrefix.c_str(), widePrefix.size());
|
||||
wideText.insert(position, widePrefix.c_str(), widePrefix.size());
|
||||
lowerText.insert(position, widePrefix);
|
||||
wideText.insert(position, widePrefix);
|
||||
position += lowerKeyword.size() + widePrefix.size();
|
||||
lowerText.insert(position, wideSuffix.c_str(), wideSuffix.size());
|
||||
wideText.insert(position, wideSuffix.c_str(), wideSuffix.size());
|
||||
lowerText.insert(position, wideSuffix);
|
||||
wideText.insert(position, wideSuffix);
|
||||
position += suffix.size();
|
||||
++count;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue