diff options
| author | steven-na <noreply.github@stvnc.dev> | 2026-08-19 12:59:37 -0700 |
|---|---|---|
| committer | steven-na <noreply.github@stvnc.dev> | 2026-08-19 12:59:37 -0700 |
| commit | 80223cd4a18b95f05addce9d6eab29348583becb (patch) | |
| tree | f1f995348d5ceeb0281654971154c0cfcc750e07 /src/string.h | |
| parent | cb95e397b887f9cda577dd89616d815cd8b2bd2a (diff) | |
Started working on hashmap
Diffstat (limited to 'src/string.h')
| -rw-r--r-- | src/string.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/string.h b/src/string.h index e3f74cf..9ff4978 100644 --- a/src/string.h +++ b/src/string.h @@ -121,10 +121,10 @@ i32 sv_find_char(strng_view_t const *sv, char n); b32 sv_starts_with(strng_view_t const *sv, char const *prefix); b32 sv_ends_with(strng_view_t const *sv, char const *suffix); -static inline b32 sv_starts_with_c(strng_view_t sv, char c) { return - (sv_len(&sv) > 0) && (*SV_TO(sv) == c); } -static inline b32 sv_ends_with_c(strng_view_t sv, char c) { return - (sv_len(&sv) > 0) && (*(sv.string + sv.end) == c); } +static inline b32 sv_starts_with_c(strng_view_t const *sv, char c) { return + (sv_len(sv) > 0) && (*SV_TO(*sv) == c); } +static inline b32 sv_ends_with_c(strng_view_t const *sv, char c) { return + (sv_len(sv) > 0) && (*(sv->string + sv->end) == c); } b32 sv_eq_case_insensitive(strng_view_t const *sv1, strng_view_t const *sv2); |