diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2022-11-22 10:25:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-22 10:25:02 +0100 |
commit | 4a4e2b0239128d862ba8371ce24f1bb8ca2b64fc (patch) | |
tree | 383b80d2116984e28dad218df17c885ebf4c29f4 /src | |
parent | 6bebaa36bfb177dd031ac38b7db9ee8da1471c8d (diff) | |
parent | d04ce481c406dd730e4613105cec64968cafa120 (diff) | |
download | redot-cpp-4a4e2b0239128d862ba8371ce24f1bb8ca2b64fc.tar.gz |
Merge pull request #930 from rune-scape/rune-missing-string-ops
Add missing String operators
Diffstat (limited to 'src')
-rw-r--r-- | src/variant/char_string.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/variant/char_string.cpp b/src/variant/char_string.cpp index cc21740..33e10db 100644 --- a/src/variant/char_string.cpp +++ b/src/variant/char_string.cpp @@ -327,6 +327,22 @@ bool String::operator!=(const char32_t *p_str) const { return *this != String(p_str); } +String String::operator+(const char *p_chr) { + return *this + String(p_chr); +} + +String String::operator+(const wchar_t *p_chr) { + return *this + String(p_chr); +} + +String String::operator+(const char16_t *p_chr) { + return *this + String(p_chr); +} + +String String::operator+(const char32_t *p_chr) { + return *this + String(p_chr); +} + const char32_t &String::operator[](int p_index) const { return *internal::gdn_interface->string_operator_index_const((GDNativeStringPtr)this, p_index); } |