MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / strnpbrk

Function strnpbrk

Source/JSON/jsoncpp.cpp:3870–3883  ·  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

3868
3869// https://github.com/upcaste/upcaste/blob/master/src/upcore/src/cstring/strnpbrk.cpp
3870static char const* strnpbrk(char const* s, char const* accept, size_t n) {
3871 assert((s || !n) && accept);
3872
3873 char const* const end = s + n;
3874 for (char const* cur = s; cur < end; ++cur) {
3875 int const c = *cur;
3876 for (char const* a = accept; *a; ++a) {
3877 if (*a == c) {
3878 return cur;
3879 }
3880 }
3881 }
3882 return NULL;
3883}
3884static std::string valueToQuotedStringN(const char* value, unsigned length) {
3885 if (value == NULL)
3886 return "";

Callers 1

valueToQuotedStringNFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected