| 27 | } |
| 28 | |
| 29 | bool starts_with_mem(const char *str, size_t len, const char *prefix) |
| 30 | { |
| 31 | const char *end = str + len; |
| 32 | for (; ; str++, prefix++) { |
| 33 | if (!*prefix) |
| 34 | return true; |
| 35 | else if (str == end || *str != *prefix) |
| 36 | return false; |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | bool skip_to_optional_arg_default(const char *str, const char *prefix, |
| 41 | const char **arg, const char *def) |
no outgoing calls
no test coverage detected