diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/stc/alt/cstr.h | 2 | ||||
| -rw-r--r-- | include/stc/cstr.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/stc/alt/cstr.h b/include/stc/alt/cstr.h index 32dec09d..da3776bd 100644 --- a/include/stc/alt/cstr.h +++ b/include/stc/alt/cstr.h @@ -102,7 +102,7 @@ STC_INLINE void cstr_insert(cstr* self, const size_t pos, const char* st { cstr_replace_n(self, pos, 0, str, strlen(str)); } STC_INLINE void cstr_insert_s(cstr* self, const size_t pos, cstr s) { cstr_replace_n(self, pos, 0, s.str, _cstr_p(&s)->size); } -STC_INLINE void cstr_replace(cstr* self, const size_t pos, const size_t len, const char* str) +STC_INLINE void cstr_replace_at(cstr* self, const size_t pos, const size_t len, const char* str) { cstr_replace_n(self, pos, len, str, strlen(str)); } STC_INLINE void cstr_replace_s(cstr* self, const size_t pos, const size_t len, cstr s) { cstr_replace_n(self, pos, len, s.str, _cstr_p(&s)->size); } diff --git a/include/stc/cstr.h b/include/stc/cstr.h index 1bf58a18..19dc0d67 100644 --- a/include/stc/cstr.h +++ b/include/stc/cstr.h @@ -317,10 +317,10 @@ STC_INLINE void cstr_replace_n(cstr* self, size_t pos, size_t len, const char* r memcpy(d + pos, repl, n); } -STC_INLINE void cstr_replace(cstr* self, size_t pos, size_t len, const char* repl) +STC_INLINE void cstr_replace_at(cstr* self, size_t pos, size_t len, const char* repl) { cstr_replace_n(self, pos, len, repl, strlen(repl)); } -STC_INLINE size_t cstr_replace_one(cstr* self, size_t pos, const char* search, const char* repl) { +STC_INLINE size_t cstr_replace(cstr* self, size_t pos, const char* search, const char* repl) { pos = cstr_find_from(*self, pos, search); if (pos == cstr_npos) return pos; |
