diff options
| author | Tyge Lovset <[email protected]> | 2023-05-20 08:58:33 +0200 |
|---|---|---|
| committer | Tyge Lovset <[email protected]> | 2023-05-20 08:58:33 +0200 |
| commit | 56b0884044610861866a1a27fb64276411604986 (patch) | |
| tree | 241cdfa174d05f0a67becc83eb10ce69dea1b2ad /include/stc/cstr.h | |
| parent | 6cd19a9ebdb5fb83f798c3d69d82e3ff08edaad4 (diff) | |
| download | STC-modified-56b0884044610861866a1a27fb64276411604986.tar.gz STC-modified-56b0884044610861866a1a27fb64276411604986.zip | |
Fixed two minor things.
Diffstat (limited to 'include/stc/cstr.h')
| -rw-r--r-- | include/stc/cstr.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/include/stc/cstr.h b/include/stc/cstr.h index 694c02d0..244b0a91 100644 --- a/include/stc/cstr.h +++ b/include/stc/cstr.h @@ -364,13 +364,11 @@ STC_INLINE void cstr_pop(cstr* self) { STC_INLINE char* cstr_append(cstr* self, const char* str) { return cstr_append_n(self, str, c_strlen(str)); } -STC_INLINE void cstr_append_sv(cstr* self, csview sv) - { cstr_append_n(self, sv.str, sv.size); } +STC_INLINE char* cstr_append_sv(cstr* self, csview sv) + { return cstr_append_n(self, sv.str, sv.size); } -STC_INLINE char* cstr_append_s(cstr* self, cstr s) { - csview sv = cstr_sv(&s); - return cstr_append_n(self, sv.str, sv.size); -} +STC_INLINE char* cstr_append_s(cstr* self, cstr s) + { return cstr_append_sv(self, cstr_sv(&s)); } #define cstr_replace(...) c_MACRO_OVERLOAD(cstr_replace, __VA_ARGS__) #define cstr_replace_3(self, search, repl) cstr_replace_4(self, search, repl, INT32_MAX) |
