aboutsummaryrefslogtreecommitdiff
path: root/utils.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2023-08-11 10:38:34 +0000
committerOmar Polo <op@omarpolo.com>2023-08-11 10:38:34 +0000
commit95500a936a1b0e42d304315fd2f7ae20ca391042 (patch)
tree449fac7d1b9f268b98c7bc3a0eda939dd7c67a4e /utils.c
parent8bb1b2363302a31c91ba921580d3227ccd3e878c (diff)
remove not so useful starts_with()
replace its only usage with strncmp(). it's likely faster too.
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/utils.c b/utils.c
index 4485f89..f75fa1c 100644
--- a/utils.c
+++ b/utils.c
@@ -47,20 +47,6 @@ strip_path(const char *path, int strip)
}
int
-starts_with(const char *str, const char *prefix)
-{
- size_t i;
-
- if (prefix == NULL)
- return 0;
-
- for (i = 0; prefix[i] != '\0'; ++i)
- if (str[i] != prefix[i])
- return 0;
- return 1;
-}
-
-int
ends_with(const char *str, const char *sufx)
{
size_t i, j;