MCPcopy Create free account
hub / github.com/ValveSoftware/openvr / strnpbrk

Function strnpbrk

src/jsoncpp.cpp:4276–4289  ·  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

4274
4275// https://github.com/upcaste/upcaste/blob/master/src/upcore/src/cstring/strnpbrk.cpp
4276static char const* strnpbrk(char const* s, char const* accept, size_t n) {
4277 assert((s || !n) && accept);
4278
4279 char const* const end = s + n;
4280 for (char const* cur = s; cur < end; ++cur) {
4281 int const c = *cur;
4282 for (char const* a = accept; *a; ++a) {
4283 if (*a == c) {
4284 return cur;
4285 }
4286 }
4287 }
4288 return NULL;
4289}
4290static std::string valueToQuotedStringN(const char* value, unsigned length) {
4291 if (value == NULL)
4292 return "";

Callers 1

valueToQuotedStringNFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected