Return the lower case character without taking into account locale like std::tolower, to avoid the "Turkish I" problem in file parsing.
| 24 | // Return the lower case character without taking into account locale like |
| 25 | // std::tolower, to avoid the "Turkish I" problem in file parsing. |
| 26 | inline unsigned char Lower(unsigned char c) |
| 27 | { |
| 28 | if(c >= 'A' && c <= 'Z') { |
| 29 | return c + ('a' - 'A'); |
| 30 | } |
| 31 | else { |
| 32 | return c; |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | // Return the upper case character, without taking into account locale. |
| 37 | inline unsigned char Upper(unsigned char c) |