| 32 | return (size_t)(end - p) >= n && memcmp(p, tag, n) == 0; |
| 33 | } |
| 34 | static const char *find_s(const char *p, const char *end, const char *needle) { |
| 35 | size_t n = strlen(needle); |
| 36 | while (p + n <= end) { |
| 37 | if (memcmp(p, needle, n) == 0) |
| 38 | return p; |
| 39 | p++; |
| 40 | } |
| 41 | return NULL; |
| 42 | } |
| 43 | static const char *skip_tag(const char *p, const char *end) { |
| 44 | while (p < end && *p != '>') |
| 45 | p++; |
no outgoing calls
no test coverage detected