File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1058,7 +1058,7 @@ class jsonh_reader : utf8_reader {
10581058 }
10591059
10601060 // Digit
1061- if (base_digits.find (to_lower (next.value ().data ())) != std::string::npos) {
1061+ if (base_digits.find (to_ascii_lower (next.value ().data ())) != std::string::npos) {
10621062 read ();
10631063 number_builder += next.value ();
10641064 }
@@ -1398,10 +1398,12 @@ class jsonh_reader : utf8_reader {
13981398 static bool is_utf16_high_surrogate (unsigned int code_point) noexcept {
13991399 return code_point >= 0xD800 && code_point <= 0xDBFF ;
14001400 }
1401- static std::string to_lower (const char * string) noexcept {
1401+ static std::string to_ascii_lower (const char * string) noexcept {
14021402 std::string result (string);
14031403 for (char & next : result) {
1404- next = std::tolower (next);
1404+ if (next <= ' Z' && next >= ' A' ) {
1405+ next -= (' Z' - ' z' );
1406+ }
14051407 }
14061408 return result;
14071409 }
You can’t perform that action at this time.
0 commit comments