https://github.com/upcaste/upcaste/blob/master/src/upcore/src/cstring/strnpbrk.cpp
| 4274 | |
| 4275 | // https://github.com/upcaste/upcaste/blob/master/src/upcore/src/cstring/strnpbrk.cpp |
| 4276 | static 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 | } |
| 4290 | static std::string valueToQuotedStringN(const char* value, unsigned length) { |
| 4291 | if (value == NULL) |
| 4292 | return ""; |
no outgoing calls
no test coverage detected