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

Function tok_pull

plugins/offers.c:569–578  ·  view source on GitHub ↗

Pull, either case! Advances tok->start on success. */

Source from the content-addressed store, hash-verified

567
568/* Pull, either case! Advances tok->start on success. */
569static bool tok_pull(const char *buffer, jsmntok_t *tok, const char *lowerstr)
570{
571 if (!json_tok_startswith(buffer, tok, lowerstr)) {
572 const char *upperstr = str_uppering(tmpctx, lowerstr);
573 if (!json_tok_startswith(buffer, tok, upperstr))
574 return false;
575 }
576 tok->start += strlen(lowerstr);
577 return true;
578}
579
580static enum likely_type guess_type(const char *buffer, const jsmntok_t *tok)
581{

Callers 2

guess_typeFunction · 0.85
param_decodableFunction · 0.85

Calls 2

json_tok_startswithFunction · 0.85
str_upperingFunction · 0.85

Tested by

no test coverage detected