summaryrefslogtreecommitdiffhomepage
path: root/misc/archived
diff options
context:
space:
mode:
authorTyge Lovset <[email protected]>2023-02-01 08:38:45 +0100
committerTyge Lovset <[email protected]>2023-02-01 08:38:45 +0100
commit6ce6ef3307e52db5813d3c8d6a2cba52df06daf8 (patch)
tree25af4be9fcd5e72778715b83ff312e157ca63b59 /misc/archived
parentb677a0c3950b8294ba6458e682a885351273ac08 (diff)
downloadSTC-modified-6ce6ef3307e52db5813d3c8d6a2cba52df06daf8.tar.gz
STC-modified-6ce6ef3307e52db5813d3c8d6a2cba52df06daf8.zip
Massive update from unsigned sizes and indices to signed.
Diffstat (limited to 'misc/archived')
-rw-r--r--misc/archived/cstr.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/misc/archived/cstr.h b/misc/archived/cstr.h
index 9111fe6d..17baf52c 100644
--- a/misc/archived/cstr.h
+++ b/misc/archived/cstr.h
@@ -56,7 +56,7 @@ STC_API void cstr_resize(cstr* self, size_t len, char fill);
STC_API cstr* cstr_assign_n(cstr* self, const char* str, size_t n);
STC_API int cstr_printf(cstr* self, const char* fmt, ...);
STC_API cstr* cstr_append_n(cstr* self, const char* str, size_t n);
-STC_API cstr cstr_replace_sv(csview str, csview find, csview repl, unsigned count);
+STC_API cstr cstr_replace_sv(csview str, csview find, csview repl, int count);
STC_DEF void cstr_replace_at_sv(cstr* self, const size_t pos, size_t len, csview repl);
STC_API void cstr_erase(cstr* self, size_t pos, size_t n);
STC_API size_t cstr_find(const cstr* self, const char* needle);
@@ -182,7 +182,7 @@ STC_INLINE uint64_t cstr_hash(const cstr *self) {
return cfasthash(self->str, _cstr_p(self)->size);
}
-STC_INLINE void cstr_replace_ex(cstr* self, const char* find, const char* repl, unsigned count) {
+STC_INLINE void cstr_replace_ex(cstr* self, const char* find, const char* repl, int count) {
cstr_take(self, cstr_replace_sv(cstr_sv(self), c_SV(find, strlen(find)),
c_SV(repl, strlen(repl)), count));
}