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

Function split_tok

common/json_parse.c:636–650  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

634}
635
636bool split_tok(const char *buffer, const jsmntok_t *tok,
637 char split,
638 jsmntok_t *a,
639 jsmntok_t *b)
640{
641 const char *p = memchr(buffer + tok->start, split, tok->end - tok->start);
642 if (!p)
643 return false;
644
645 *a = *b = *tok;
646 a->end = p - buffer;
647 b->start = p + 1 - buffer;
648
649 return true;
650}
651
652bool json_to_secret(const char *buffer, const jsmntok_t *tok, struct secret *dest)
653{

Callers 7

param_txoutFunction · 0.85
json_to_outpointFunction · 0.85
param_amountFunction · 0.85
init_rebalancesFunction · 0.85
load_currencyratesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected