(m byte)
| 29 | } |
| 30 | |
| 31 | func value(m byte) int { |
| 32 | if m >= '0' && m <= '9' { |
| 33 | return int((m - '0') + 100) |
| 34 | } |
| 35 | if m >= 'A' && m <= 'Z' { |
| 36 | return int(m - 'A') |
| 37 | } |
| 38 | if m >= 'a' && m <= 'z' { |
| 39 | return int(m - 'a') |
| 40 | } |
| 41 | return -1 |
| 42 | } |
| 43 | |
| 44 | // Same func but with usage of regexp and strings modules |
| 45 |