-#define strstarts(str,prefix) (strncmp((str),(prefix),strlen(prefix)) == 0)
-
-static inline bool strends(const char *str, const char *postfix)
-{
- if (strlen(str) < strlen(postfix))
- return false;
-
- return streq(str + strlen(str) - strlen(postfix), postfix);
-}
-
-static int unlink_no_errno(const char *filename)
-{
- int ret = 0, serrno = errno;
- if (unlink(filename) < 0)
- ret = errno;
- errno = serrno;
- return ret;
-}
-