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

Function json_tok_endswith

common/json_parse_simple.c:52–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52bool json_tok_endswith(const char *buffer, const jsmntok_t *tok,
53 const char *suffix)
54{
55 if (tok->type != JSMN_STRING)
56 return false;
57 if (tok->end - tok->start < strlen(suffix))
58 return false;
59 return memcmp(buffer + tok->end - strlen(suffix),
60 suffix, strlen(suffix)) == 0;
61}
62
63char *json_strdup(const tal_t *ctx, const char *buffer, const jsmntok_t *tok)
64{

Callers 3

param_feerate_valFunction · 0.85
json_to_timeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected