summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorTyge Lovset <[email protected]>2023-05-20 08:58:33 +0200
committerTyge Lovset <[email protected]>2023-05-20 08:58:33 +0200
commit56b0884044610861866a1a27fb64276411604986 (patch)
tree241cdfa174d05f0a67becc83eb10ce69dea1b2ad /include
parent6cd19a9ebdb5fb83f798c3d69d82e3ff08edaad4 (diff)
downloadSTC-modified-56b0884044610861866a1a27fb64276411604986.tar.gz
STC-modified-56b0884044610861866a1a27fb64276411604986.zip
Fixed two minor things.
Diffstat (limited to 'include')
-rw-r--r--include/stc/cstr.h10
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)