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