https://github.com/upcaste/upcaste/blob/master/src/upcore/src/cstring/strnpbrk.cpp
| 4319 | |
| 4320 | // https://github.com/upcaste/upcaste/blob/master/src/upcore/src/cstring/strnpbrk.cpp |
| 4321 | static 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 | } |
| 4335 | static JSONCPP_STRING valueToQuotedStringN(const char* value, unsigned length) { |
| 4336 | if (value == NULL) |
| 4337 | return ""; |
no test coverage detected