* Gets the character (or string) corresponding to the passed code in the given table * * @param table the table used * @param code the code of the character */
| 193 | * @param code the code of the character |
| 194 | */ |
| 195 | static const char* GetCharacter(Table table, int code) |
| 196 | { |
| 197 | switch (table) { |
| 198 | case Table::UPPER: return UPPER_TABLE[code]; |
| 199 | case Table::LOWER: return LOWER_TABLE[code]; |
| 200 | case Table::MIXED: return MIXED_TABLE[code]; |
| 201 | case Table::PUNCT: return PUNCT_TABLE[code]; |
| 202 | case Table::DIGIT: return DIGIT_TABLE[code]; |
| 203 | case Table::BINARY: return nullptr; // should not happen |
| 204 | } |
| 205 | // silence gcc warning/error (this code can not be reached) |
| 206 | return nullptr; |
| 207 | } |
| 208 | |
| 209 | /** |
| 210 | * See ISO/IEC 24778:2008 Section 10.1 |