MCPcopy Create free account
hub / github.com/ElementsProject/lightning / json_tok_is_num

Function json_tok_is_num

common/json_parse_simple.c:168–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166
167
168bool json_tok_is_num(const char *buffer, const jsmntok_t *tok)
169{
170 if (tok->type != JSMN_PRIMITIVE)
171 return false;
172
173 for (int i = tok->start; i < tok->end; i++)
174 if (!cisdigit(buffer[i]))
175 return false;
176 return true;
177}
178
179bool json_tok_is_null(const char *buffer, const jsmntok_t *tok)
180{

Callers

nothing calls this directly

Calls 1

cisdigitFunction · 0.85

Tested by

no test coverage detected