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

Function tok_pull

plugins/offers.c:567–576  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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

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