summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorrune-scape <allie.smith.epic@gmail.com>2022-11-20 03:44:54 -0500
committerrune-scape <allie.smith.epic@gmail.com>2022-11-20 03:44:54 -0500
commitd04ce481c406dd730e4613105cec64968cafa120 (patch)
treea8bb308351028d4d7d6b1d64721ffaa03e9210e1 /src
parent6c2f9196d76b81de0ea0ff7480767c4c34336882 (diff)
downloadredot-cpp-d04ce481c406dd730e4613105cec64968cafa120.tar.gz
Add missing String operators
Diffstat (limited to 'src')
-rw-r--r--src/variant/char_string.cpp16
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);
}