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/csview.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/csview.h')
| -rw-r--r-- | include/stc/csview.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/stc/csview.h b/include/stc/csview.h index 005f27de..f41acf4f 100644 --- a/include/stc/csview.h +++ b/include/stc/csview.h @@ -165,12 +165,12 @@ STC_DEF csview_iter csview_advance(csview_iter it, intptr_t pos) { } STC_DEF intptr_t csview_find_sv(csview sv, csview search) { - 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; } STC_DEF uint64_t csview_hash(const csview *self) - { return cbytehash(self->buf, self->size); } + { return stc_hash(self->buf, self->size); } STC_DEF csview csview_substr_ex(csview sv, intptr_t pos, intptr_t n) { if (pos < 0) { @@ -197,7 +197,7 @@ STC_DEF csview csview_slice_ex(csview sv, intptr_t p1, intptr_t p2) { STC_DEF csview csview_token(csview sv, const char* sep, intptr_t* start) { intptr_t sep_size = c_strlen(sep); csview slice = {sv.buf + *start, sv.size - *start}; - const char* res = cstrnstrn(slice.buf, sep, slice.size, sep_size); + const char* res = stc_strnstrn(slice.buf, sep, slice.size, sep_size); csview tok = {slice.buf, res ? (res - slice.buf) : slice.size}; *start += tok.size + sep_size; return tok; |
