diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-11-11 00:25:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-11 00:25:41 +0100 |
commit | 88d463cabcfe2bf2b0f14e4ad34cb2741b8da686 (patch) | |
tree | e07e6e9a4d22cce046f03b36d06af28a73fea362 /core/string | |
parent | a80ec80b57f419d84d196fb46dcb5f194c880001 (diff) | |
parent | 5288ff538d75d2ddab257a9e1e40050c9b8fa1cb (diff) |
Merge pull request #43446 from reduz/create-variant-builtin-funcs
Create Variant built-in functions.
Diffstat (limited to 'core/string')
-rw-r--r-- | core/string/ustring.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/core/string/ustring.h b/core/string/ustring.h index 201b439b12..b46733ab66 100644 --- a/core/string/ustring.h +++ b/core/string/ustring.h @@ -536,4 +536,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 |