diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2022-08-09 16:03:17 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-09 16:03:17 +0200 |
| commit | bcccc8338fbf0f6ac55fce893e6452951f31e44b (patch) | |
| tree | 33c8d34d57530b9a2957234a5de99902a02041b0 /src/string.cpp | |
| parent | 838554460bbf0d591bc325359ad6d62011654a71 (diff) | |
| parent | c1c8ceafc243389d8eb94feca99de1239da32408 (diff) | |
Merge pull request #1937 from IanLilleyT/rc_fix
Find rc.exe in Windows SDK
Diffstat (limited to 'src/string.cpp')
| -rw-r--r-- | src/string.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/string.cpp b/src/string.cpp index 44eccd2d2..bc55e370c 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -324,6 +324,16 @@ String concatenate3_strings(gbAllocator a, String const &x, String const &y, Str data[len] = 0; return make_string(data, len); } +String concatenate4_strings(gbAllocator a, String const &x, String const &y, String const &z, String const &w) { + isize len = x.len+y.len+z.len+w.len; + u8 *data = gb_alloc_array(a, u8, len+1); + gb_memmove(data, x.text, x.len); + gb_memmove(data+x.len, y.text, y.len); + gb_memmove(data+x.len+y.len, z.text, z.len); + gb_memmove(data+x.len+y.len+z.len, w.text, w.len); + data[len] = 0; + return make_string(data, len); +} String string_join_and_quote(gbAllocator a, Array<String> strings) { if (!strings.count) { |