Return the upper case character, without taking into account locale.
| 35 | |
| 36 | // Return the upper case character, without taking into account locale. |
| 37 | inline unsigned char Upper(unsigned char c) |
| 38 | { |
| 39 | if(c >= 'a' && c <= 'z') { |
| 40 | return c - ('a' - 'A'); |
| 41 | } |
| 42 | else { |
| 43 | return c; |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | // Checks if character is whitespace (space, tab, newline or other |
| 48 | // non-printable char). Does not take locale into account. |