summaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-03-04 18:48:22 -0500
committerpommicket <pommicket@gmail.com>2023-03-04 18:48:22 -0500
commit8a13f9fa37b5401c836e0ce8674cee5255512d5e (patch)
treefce7438f610e0c1c44b35763b756e62c3b5f2dc9 /util.h
parenta8ecd337a1714653710d69a9fcaea8b354ffded8 (diff)
new light style
also highlighting of POSIX types
Diffstat (limited to 'util.h')
-rw-r--r--util.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/util.h b/util.h
index 0f8ca55..8c65b35 100644
--- a/util.h
+++ b/util.h
@@ -73,9 +73,11 @@ bool util_is_power_of_2(u64 x);
char32_t *util_mem32chr(char32_t *s, char32_t c, size_t n);
/// like memchr, but 32-bit, and constant.
const char32_t *util_mem32chr_const(const char32_t *s, char32_t c, size_t n);
-/// does `str` have this prefix?
+/// does `str` start with `prefix`?
bool str_has_prefix(const char *str, const char *prefix);
-/// like str_has_prefix, but for paths. "ab/cd" is a path-prefix of "ab/cd/ef", but not "ab/cde".
+/// does `str` end with `suffix`?
+bool str_has_suffix(const char *str, const char *suffix);
+/// like \ref str_has_prefix, but for paths. "ab/cd" is a path-prefix of "ab/cd/ef", but not "ab/cde".
/// also handles the fact that \ and / are the same on windows
bool str_has_path_prefix(const char *path, const char *prefix);
/// are these two strings equal?