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

Function json_tok_is_num

common/json_parse_simple.c:174–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172
173
174bool json_tok_is_num(const char *buffer, const jsmntok_t *tok)
175{
176 if (tok->type != JSMN_PRIMITIVE)
177 return false;
178
179 for (int i = tok->start; i < tok->end; i++)
180 if (!cisdigit(buffer[i]))
181 return false;
182 return true;
183}
184
185bool json_tok_is_null(const char *buffer, const jsmntok_t *tok)
186{

Callers

nothing calls this directly

Calls 1

cisdigitFunction · 0.85

Tested by

no test coverage detected