diff options
author | crupest <crupest@outlook.com> | 2022-03-10 16:01:56 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-03-10 16:01:56 +0800 |
commit | 0b5c16f6b35f7144b34996d8c77f370bcbcf150c (patch) | |
tree | da6039de16d0de9aa8c6ee1afdcec44133ce4133 /include/cru/common/String.h | |
parent | 268bec4cd0d562394c2c27d10a26be1264bc8648 (diff) | |
download | cru-0b5c16f6b35f7144b34996d8c77f370bcbcf150c.tar.gz cru-0b5c16f6b35f7144b34996d8c77f370bcbcf150c.tar.bz2 cru-0b5c16f6b35f7144b34996d8c77f370bcbcf150c.zip |
...
Diffstat (limited to 'include/cru/common/String.h')
-rw-r--r-- | include/cru/common/String.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/include/cru/common/String.h b/include/cru/common/String.h index 9ec494c6..7bbbecfb 100644 --- a/include/cru/common/String.h +++ b/include/cru/common/String.h @@ -356,7 +356,22 @@ class CRU_BASE_API StringView { CRU_DEFINE_COMPARE_OPERATORS(String) inline String operator+(const String& left, const String& right) { - String result(left); + String result; + result += left; + result += right; + return result; +} + +inline String operator+(String::value_type left, const String& right) { + String result; + result += left; + result += right; + return result; +} + +inline String operator+(const String& left, String::value_type right) { + String result; + result += left; result += right; return result; } |