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

Function mempbrkm

ccan/ccan/mem/mem.c:45–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43#endif
44
45void *mempbrkm(const void *data_, size_t len, const void *accept_, size_t accept_len)
46{
47 const char *data = data_, *accept = accept_;
48 size_t i, j;
49
50 for (i = 0; i < len; i++)
51 for (j = 0; j < accept_len; j++)
52 if (accept[j] == data[i])
53 return (void *)&data[i];
54 return NULL;
55}
56
57void *memcchr(void const *data, int c, size_t data_len)
58{

Callers 2

mempbrkFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by 1

mainFunction · 0.68