Checks whether (JSMN_STRING) token equals a certain string value. */
| 328 | |
| 329 | /** Checks whether (JSMN_STRING) token equals a certain string value. */ |
| 330 | int string_eq(jsmntok_t *tok, const char *s) { |
| 331 | int len = tok->end - tok->start; |
| 332 | return strlen(s) == len && !strncmp(input + tok->start, s, len); |
| 333 | } |
| 334 | |
| 335 | /** Checks whether token start with s. */ |
| 336 | int token_startsWith(jsmntok_t *tok, const char *s) { |
no outgoing calls
no test coverage detected