MCPcopy Create free account
hub / github.com/altairwei/WizNotePlus / strnpbrk

Function strnpbrk

src/share/jsoncpp/jsoncpp.cpp:4321–4334  ·  view source on GitHub ↗

https://github.com/upcaste/upcaste/blob/master/src/upcore/src/cstring/strnpbrk.cpp

Source from the content-addressed store, hash-verified

4319
4320// https://github.com/upcaste/upcaste/blob/master/src/upcore/src/cstring/strnpbrk.cpp
4321static char const* strnpbrk(char const* s, char const* accept, size_t n) {
4322 assert((s || !n) && accept);
4323
4324 char const* const end = s + n;
4325 for (char const* cur = s; cur < end; ++cur) {
4326 int const c = *cur;
4327 for (char const* a = accept; *a; ++a) {
4328 if (*a == c) {
4329 return cur;
4330 }
4331 }
4332 }
4333 return NULL;
4334}
4335static JSONCPP_STRING valueToQuotedStringN(const char* value, unsigned length) {
4336 if (value == NULL)
4337 return "";

Callers 1

valueToQuotedStringNFunction · 0.85

Calls 1

assertFunction · 0.85

Tested by

no test coverage detected