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/cstr.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/cstr.h')
| -rw-r--r-- | include/stc/cstr.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/stc/cstr.h b/include/stc/cstr.h index 51519d82..d2faeb62 100644 --- a/include/stc/cstr.h +++ b/include/stc/cstr.h @@ -450,12 +450,12 @@ bool cstr_valid_utf8(const cstr* self) STC_DEF uint64_t cstr_hash(const cstr *self) { csview sv = cstr_sv(self); - return cbytehash(sv.buf, sv.size); + return stc_hash(sv.buf, sv.size); } STC_DEF intptr_t cstr_find_sv(const cstr* self, csview search) { csview sv = cstr_sv(self); - char* res = cstrnstrn(sv.buf, search.buf, sv.size, search.size); + char* res = stc_strnstrn(sv.buf, search.buf, sv.size, search.size); return res ? (res - sv.buf) : c_NPOS; } @@ -588,7 +588,7 @@ STC_DEF cstr cstr_replace_sv(csview in, csview search, csview repl, int32_t coun intptr_t from = 0; char* res; if (!count) count = INT32_MAX; if (search.size) - while (count-- && (res = cstrnstrn(in.buf + from, search.buf, in.size - from, search.size))) { + while (count-- && (res = stc_strnstrn(in.buf + from, search.buf, in.size - from, search.size))) { const intptr_t pos = (res - in.buf); cstr_append_n(&out, in.buf + from, pos - from); cstr_append_n(&out, repl.buf, repl.size); |
