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

Function path_ext_off

ccan/ccan/tal/path/path.c:546–561  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

544}
545
546size_t path_ext_off(const char *path)
547{
548 const char *dot, *base;
549
550 dot = strrchr(path, '.');
551 if (dot) {
552 base = strrchr(path, PATH_SEP);
553 if (!base)
554 base = path;
555 else
556 base++;
557 if (dot > base)
558 return dot - path;
559 }
560 return strlen(path);
561}

Callers 2

mainFunction · 0.85
new_pluginFunction · 0.85

Calls

no outgoing calls

Tested by 1

mainFunction · 0.68