diff options
author | Aki <please@ignore.pl> | 2022-04-12 19:10:20 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2022-04-12 19:10:20 +0200 |
commit | dc55c64d0d7fef87fce72c272d02f874efff4397 (patch) | |
tree | 4ab514644368c2b8529ddccbad2f6be0f4b52899 /FoundationEx/Text.cpp | |
parent | cbc7d648a83274c87a2d3796a2877adc8c48cb42 (diff) | |
download | starshatter-dc55c64d0d7fef87fce72c272d02f874efff4397.zip starshatter-dc55c64d0d7fef87fce72c272d02f874efff4397.tar.gz starshatter-dc55c64d0d7fef87fce72c272d02f874efff4397.tar.bz2 |
Added concat method to Text that does not mutate base
Diffstat (limited to 'FoundationEx/Text.cpp')
-rw-r--r-- | FoundationEx/Text.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/FoundationEx/Text.cpp b/FoundationEx/Text.cpp index ac86d5e..442a048 100644 --- a/FoundationEx/Text.cpp +++ b/FoundationEx/Text.cpp @@ -658,6 +658,14 @@ Text::replace(const char* pattern, const char* substitution) } Text +Text::concat(const char* tail) const +{ + Text result(*this); + result.append(tail); + return result; +} + +Text Text::format(const char* fmt, ...) { char buf[2048]; |