| 669 | } |
| 670 | |
| 671 | static bool starts_with_segment(const char *path, const char *segment) { |
| 672 | if (!path || path[0] != '/' || !segment) { |
| 673 | return false; |
| 674 | } |
| 675 | size_t seg_len = strlen(segment); |
| 676 | const char *p = path + 1; |
| 677 | return strncmp(p, segment, seg_len) == 0 && (p[seg_len] == '\0' || p[seg_len] == '/'); |
| 678 | } |
| 679 | |
| 680 | static bool contains_segment(const char *path, const char *segment) { |
| 681 | if (!path || !segment) { |
no outgoing calls
no test coverage detected