diff options
Diffstat (limited to 'core/string')
-rw-r--r-- | core/string/string_name.h | 1 | ||||
-rw-r--r-- | core/string/ustring.cpp | 1 | ||||
-rw-r--r-- | core/string/ustring.h | 23 |
3 files changed, 21 insertions, 4 deletions
diff --git a/core/string/string_name.h b/core/string/string_name.h index e6b46506c3..320f63bf68 100644 --- a/core/string/string_name.h +++ b/core/string/string_name.h @@ -44,7 +44,6 @@ struct StaticCString { class StringName { enum { - STRING_TABLE_BITS = 12, STRING_TABLE_LEN = 1 << STRING_TABLE_BITS, STRING_TABLE_MASK = STRING_TABLE_LEN - 1 diff --git a/core/string/ustring.cpp b/core/string/ustring.cpp index b5758bddf3..213578485e 100644 --- a/core/string/ustring.cpp +++ b/core/string/ustring.cpp @@ -3864,7 +3864,6 @@ String String::xml_escape(bool p_escape_quotes) const { } /* for (int i=1;i<32;i++) { - char chr[2]={i,0}; str=str.replace(chr,"&#"+String::num(i)+";"); }*/ diff --git a/core/string/ustring.h b/core/string/ustring.h index 35475a2124..bfae16fe64 100644 --- a/core/string/ustring.h +++ b/core/string/ustring.h @@ -198,7 +198,6 @@ class String { public: enum { - npos = -1 ///<for "some" compatibility with std::string (npos is a huge value in std::string) }; @@ -433,10 +432,10 @@ public: /** * The constructors must not depend on other overloads */ - /* String(char32_t p_char);*/ _FORCE_INLINE_ String() {} _FORCE_INLINE_ String(const String &p_str) { _cowdata._ref(p_str._cowdata); } + String &operator=(const String &p_str) { _cowdata._ref(p_str._cowdata); return *this; @@ -536,4 +535,24 @@ String RTRN(const String &p_text, const String &p_text_plural, int p_n, const St bool is_symbol(char32_t c); bool select_word(const String &p_s, int p_col, int &r_beg, int &r_end); +_FORCE_INLINE_ void sarray_add_str(Vector<String> &arr) { +} + +_FORCE_INLINE_ void sarray_add_str(Vector<String> &arr, const String &p_str) { + arr.push_back(p_str); +} + +template <class... P> +_FORCE_INLINE_ void sarray_add_str(Vector<String> &arr, const String &p_str, P... p_args) { + arr.push_back(p_str); + sarray_add_str(arr, p_args...); +} + +template <class... P> +_FORCE_INLINE_ Vector<String> sarray(P... p_args) { + Vector<String> arr; + sarray_add_str(arr, p_args...); + return arr; +} + #endif // USTRING_H |