summaryrefslogtreecommitdiffhomepage
path: root/include/stc/cstr.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/stc/cstr.h')
-rw-r--r--include/stc/cstr.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/stc/cstr.h b/include/stc/cstr.h
index 3605bab8..5f6e19a8 100644
--- a/include/stc/cstr.h
+++ b/include/stc/cstr.h
@@ -413,11 +413,11 @@ STC_API uint64_t cstr_hash(const cstr *self);
STC_DEF uint64_t cstr_hash(const cstr *self) {
csview sv = cstr_sv(self);
- return c_fasthash(sv.str, sv.size);
+ return cfasthash(sv.str, sv.size);
}
STC_DEF size_t cstr_find_sv(const cstr* self, csview search) {
- char* res = c_strnstrn(cstr_str(self), search.str, cstr_size(self), search.size);
+ char* res = cstrnstrn(cstr_str(self), search.str, cstr_size(self), search.size);
return res ? res - cstr_str(self) : cstr_npos;
}
@@ -540,7 +540,7 @@ cstr_replace_sv(csview in, csview search, csview repl, unsigned count) {
size_t from = 0; char* res;
if (!count) count = ~0;
if (search.size)
- while (count-- && (res = c_strnstrn(in.str + from, search.str, in.size - from, search.size))) {
+ while (count-- && (res = cstrnstrn(in.str + from, search.str, in.size - from, search.size))) {
const size_t pos = res - in.str;
cstr_append_n(&out, in.str + from, pos - from);
cstr_append_n(&out, repl.str, repl.size);