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

Function json_tok_startswith

common/json_parse_simple.c:41–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41bool json_tok_startswith(const char *buffer, const jsmntok_t *tok,
42 const char *prefix)
43{
44 if (tok->type != JSMN_STRING)
45 return false;
46 if (tok->end - tok->start < strlen(prefix))
47 return false;
48 return memcmp(buffer + tok->start,
49 prefix, strlen(prefix)) == 0;
50}
51
52bool json_tok_endswith(const char *buffer, const jsmntok_t *tok,
53 const char *suffix)

Callers 3

param_recurrence_baseFunction · 0.50
param_decodableFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected