diff options
author | pommicket <pommicket@gmail.com> | 2023-03-04 18:48:22 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-03-04 18:48:22 -0500 |
commit | 8a13f9fa37b5401c836e0ce8674cee5255512d5e (patch) | |
tree | fce7438f610e0c1c44b35763b756e62c3b5f2dc9 /util.h | |
parent | a8ecd337a1714653710d69a9fcaea8b354ffded8 (diff) |
new light style
also highlighting of POSIX types
Diffstat (limited to 'util.h')
-rw-r--r-- | util.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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? |