diff options
author | Ryan Harrison <rharrison@chromium.org> | 2018-03-13 15:16:00 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-03-13 15:16:00 +0000 |
commit | 7a1aa5f659110e99950b00b6b326b41436872635 (patch) | |
tree | 16d89f9e2fc865b1a7a7727190938ad8499551e5 /core/fxcrt/fx_extension.h | |
parent | 0c6b98182403868334b4dfe4852caa4d0e2ba272 (diff) | |
download | pdfium-7a1aa5f659110e99950b00b6b326b41436872635.tar.xz |
Remove usage of FXSYS_*ASCIIlower/upper methodschromium/3370
This replaces them with equivalent FXSYS_*wlower/upper methods, which
uses ICU to perform the correct Unicode operations.
BUG=pdfium:1035
Change-Id: I432db5bef9eda71762016b619d93155949d054db
Reviewed-on: https://pdfium-review.googlesource.com/28530
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fxcrt/fx_extension.h')
-rw-r--r-- | core/fxcrt/fx_extension.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/core/fxcrt/fx_extension.h b/core/fxcrt/fx_extension.h index 8e9d06694f..0f249f89c8 100644 --- a/core/fxcrt/fx_extension.h +++ b/core/fxcrt/fx_extension.h @@ -26,20 +26,20 @@ float FXSYS_wcstof(const wchar_t* pwsStr, wchar_t* FXSYS_wcsncpy(wchar_t* dstStr, const wchar_t* srcStr, size_t count); int32_t FXSYS_wcsnicmp(const wchar_t* s1, const wchar_t* s2, size_t count); -inline bool FXSYS_isASCIIlower(int32_t ch) { - return ch >= 'a' && ch <= 'z'; +inline bool FXSYS_iswlower(int32_t c) { + return u_islower(c); } -inline bool FXSYS_isASCIIupper(int32_t ch) { - return ch >= 'A' && ch <= 'Z'; +inline bool FXSYS_iswupper(int32_t c) { + return u_isupper(c); } -inline int32_t FXSYS_toASCIIlower(int32_t ch) { - return ch < 'A' || ch > 'Z' ? ch : (ch + 0x20); +inline int32_t FXSYS_towlower(wchar_t c) { + return u_tolower(c); } -inline int32_t FXSYS_toASCIIupper(int32_t ch) { - return ch < 'a' || ch > 'z' ? ch : (ch - 0x20); +inline int32_t FXSYS_towupper(wchar_t c) { + return u_toupper(c); } inline bool FXSYS_iswalpha(wchar_t c) { |