| 394 | } |
| 395 | |
| 396 | const char *str_startswith(const char *str, const char *prefix) |
| 397 | { |
| 398 | int prefixl = str_length(prefix); |
| 399 | if(str_comp_num(str, prefix, prefixl) == 0) |
| 400 | { |
| 401 | return str + prefixl; |
| 402 | } |
| 403 | else |
| 404 | { |
| 405 | return nullptr; |
| 406 | } |
| 407 | } |
| 408 | |
| 409 | const char *str_endswith_nocase(const char *str, const char *suffix) |
| 410 | { |