diff options
| author | Tyge Løvset <[email protected]> | 2023-09-05 18:10:14 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2023-09-05 18:10:14 +0200 |
| commit | 493c34e9c2de0587f38681340db8f2735e72d7dd (patch) | |
| tree | 158838cfe8a4a59d258a9a5817faf2a18808ff38 /include/stc/crawstr.h | |
| parent | 3628e4389ef9455960c42466487385fc228566c3 (diff) | |
| download | STC-modified-493c34e9c2de0587f38681340db8f2735e72d7dd.tar.gz STC-modified-493c34e9c2de0587f38681340db8f2735e72d7dd.zip | |
Renamed (half)internal functions:
cfasthash() => stc_hash()
cstrhash() => stc_strhash()
cnextpow2() => stc_nextpow2()
Diffstat (limited to 'include/stc/crawstr.h')
| -rw-r--r-- | include/stc/crawstr.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/stc/crawstr.h b/include/stc/crawstr.h index a244397d..9dbdb6f7 100644 --- a/include/stc/crawstr.h +++ b/include/stc/crawstr.h @@ -45,7 +45,7 @@ STC_INLINE bool crawstr_equals(crawstr rs, const char* str) { } STC_INLINE intptr_t crawstr_find(crawstr rs, const char* search) { - char* res = cstrnstrn(rs.str, search, rs.size, c_strlen(search)); + char* res = strstr(rs.str, search); return res ? (res - rs.str) : c_NPOS; } @@ -98,7 +98,7 @@ STC_INLINE bool crawstr_eq(const crawstr* x, const crawstr* y) { return x->size == y->size && !c_memcmp(x->str, y->str, x->size); } STC_INLINE uint64_t crawstr_hash(const crawstr *self) - { return cbytehash(self->str, self->size); } + { return stc_hash(self->str, self->size); } #endif // CRAWSTR_H_INCLUDED #undef i_static |
