| 126 | } |
| 127 | |
| 128 | bool cbm_str_starts_with(const char *s, const char *prefix) { |
| 129 | if (!s || !prefix) { |
| 130 | return false; |
| 131 | } |
| 132 | size_t plen = strlen(prefix); |
| 133 | return strncmp(s, prefix, plen) == 0; |
| 134 | } |
| 135 | |
| 136 | bool cbm_str_ends_with(const char *s, const char *suffix) { |
| 137 | if (!s || !suffix) { |