* gets the table corresponding to the char passed
(t: string)
| 157 | * gets the table corresponding to the char passed |
| 158 | */ |
| 159 | private static getTable(t: string): Table { |
| 160 | switch (t) { |
| 161 | case 'L': |
| 162 | return Table.LOWER; |
| 163 | case 'P': |
| 164 | return Table.PUNCT; |
| 165 | case 'M': |
| 166 | return Table.MIXED; |
| 167 | case 'D': |
| 168 | return Table.DIGIT; |
| 169 | case 'B': |
| 170 | return Table.BINARY; |
| 171 | case 'U': |
| 172 | default: |
| 173 | return Table.UPPER; |
| 174 | } |
| 175 | } |
| 176 | |
| 177 | /** |
| 178 | * Gets the character (or string) corresponding to the passed code in the given table |