| 551 | } |
| 552 | |
| 553 | static bool starts_with_segment(const char *path, const char *segment) { |
| 554 | if (!path || path[0] != '/' || !segment) { |
| 555 | return false; |
| 556 | } |
| 557 | size_t seg_len = strlen(segment); |
| 558 | const char *p = path + 1; |
| 559 | return strncmp(p, segment, seg_len) == 0 && (p[seg_len] == '\0' || p[seg_len] == '/'); |
| 560 | } |
| 561 | |
| 562 | static bool contains_segment(const char *path, const char *segment) { |
| 563 | if (!path || !segment) { |
no outgoing calls
no test coverage detected