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

Function split_tok

common/json_parse.c:616–630  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

614}
615
616bool split_tok(const char *buffer, const jsmntok_t *tok,
617 char split,
618 jsmntok_t *a,
619 jsmntok_t *b)
620{
621 const char *p = memchr(buffer + tok->start, split, tok->end - tok->start);
622 if (!p)
623 return false;
624
625 *a = *b = *tok;
626 a->end = p - buffer;
627 b->start = p + 1 - buffer;
628
629 return true;
630}
631
632bool json_to_secret(const char *buffer, const jsmntok_t *tok, struct secret *dest)
633{

Callers 4

param_txoutFunction · 0.85
json_to_outpointFunction · 0.85
param_amountFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected