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

Function json_tok_endswith

common/json_parse_simple.c:45–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45bool json_tok_endswith(const char *buffer, const jsmntok_t *tok,
46 const char *suffix)
47{
48 if (tok->type != JSMN_STRING)
49 return false;
50 if (tok->end - tok->start < strlen(suffix))
51 return false;
52 return memcmp(buffer + tok->end - strlen(suffix),
53 suffix, strlen(suffix)) == 0;
54}
55
56char *json_strdup(const tal_t *ctx, const char *buffer, const jsmntok_t *tok)
57{

Callers 3

param_feerate_uncheckedFunction · 0.85
param_feerate_valFunction · 0.85
json_to_timeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected