diff options
Diffstat (limited to 'core/fpdftext/cpdf_textpagefind.cpp')
-rw-r--r-- | core/fpdftext/cpdf_textpagefind.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/core/fpdftext/cpdf_textpagefind.cpp b/core/fpdftext/cpdf_textpagefind.cpp index 7eaac35194..a4f4a6e828 100644 --- a/core/fpdftext/cpdf_textpagefind.cpp +++ b/core/fpdftext/cpdf_textpagefind.cpp @@ -348,15 +348,10 @@ bool CPDF_TextPageFind::IsMatchWholeWord(const CFX_WideString& csPageText, return false; } if (char_count > 0) { - if (csPageText.GetAt(startPos) >= L'0' && - csPageText.GetAt(startPos) <= L'9' && char_left >= L'0' && - char_left <= L'9') { + if (std::iswdigit(char_left) && std::iswdigit(csPageText.GetAt(startPos))) return false; - } - if (csPageText.GetAt(endPos) >= L'0' && csPageText.GetAt(endPos) <= L'9' && - char_right >= L'0' && char_right <= L'9') { + if (std::iswdigit(char_right) && std::iswdigit(csPageText.GetAt(endPos))) return false; - } } return true; } |