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

Function json_tok_is_num

common/json_parse_simple.c:121–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119
120
121bool json_tok_is_num(const char *buffer, const jsmntok_t *tok)
122{
123 if (tok->type != JSMN_PRIMITIVE)
124 return false;
125
126 for (int i = tok->start; i < tok->end; i++)
127 if (!cisdigit(buffer[i]))
128 return false;
129 return true;
130}
131
132bool json_tok_is_null(const char *buffer, const jsmntok_t *tok)
133{

Callers 1

param_labelFunction · 0.85

Calls 1

cisdigitFunction · 0.85

Tested by

no test coverage detected