Return the hex character representing the integer val. The value is masked to make sure it is in the correct range.
| 259 | // Return the hex character representing the integer val. The value is masked |
| 260 | // to make sure it is in the correct range. |
| 261 | static uint8_t hexChar(uint8_t val) { |
| 262 | val &= 0x0F; |
| 263 | if (val < 10) { |
| 264 | return val + '0'; |
| 265 | } else { |
| 266 | return val - 10 + 'a'; |
| 267 | } |
| 268 | } |
| 269 | |
| 270 | // Return true if the character ch is in [-+0-9.Ee]; false otherwise |
| 271 | static bool isJSONNumeric(uint8_t ch) { |