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

Function find_suffix

common/splice_script.c:536–549  ·  view source on GitHub ↗

Returns point in str that starts match of suffix. */

Source from the content-addressed store, hash-verified

534
535/* Returns point in str that starts match of suffix. */
536static char *find_suffix(char *str, char *suffix)
537{
538 char *ptr;
539
540 if (strlen(str) < strlen(suffix))
541 return false;
542
543 ptr = str + strlen(str) - strlen(suffix);
544
545 if (streq(ptr, suffix))
546 return ptr;
547
548 return NULL;
549}
550
551static struct splice_script_error *find_arrows_and_strs(const tal_t *ctx,
552 struct token ***tokens_inout)

Callers 1

find_arrows_and_strsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected