summaryrefslogtreecommitdiffstats
path: root/core/variant_call.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-09-24 11:50:58 +0200
committerGitHub <noreply@github.com>2019-09-24 11:50:58 +0200
commitef2a7834c9d3fbbd95a9d26ff2913e4b3c5d8f5f (patch)
tree3afbf1e30e213e0f0555aae1de1d28eb08d06cbf /core/variant_call.cpp
parentcefa56ef1fb1f700035bce5c7f005dab65b9dc81 (diff)
parent073f625a91969b93644321326e42bbc511348262 (diff)
downloadredot-engine-ef2a7834c9d3fbbd95a9d26ff2913e4b3c5d8f5f.tar.gz
Merge pull request #31883 from aole/create-string-function-repeat
Create a GDScript String function repeat
Diffstat (limited to 'core/variant_call.cpp')
-rw-r--r--core/variant_call.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/variant_call.cpp b/core/variant_call.cpp
index c288c50abf..53f64fcde6 100644
--- a/core/variant_call.cpp
+++ b/core/variant_call.cpp
@@ -256,6 +256,7 @@ struct _VariantCall {
VCALL_LOCALMEM2R(String, format);
VCALL_LOCALMEM2R(String, replace);
VCALL_LOCALMEM2R(String, replacen);
+ VCALL_LOCALMEM1R(String, repeat);
VCALL_LOCALMEM2R(String, insert);
VCALL_LOCALMEM0R(String, capitalize);
VCALL_LOCALMEM3R(String, split);
@@ -1530,6 +1531,7 @@ void register_variant_methods() {
ADDFUNC2R(STRING, STRING, String, format, NIL, "values", STRING, "placeholder", varray("{_}"));
ADDFUNC2R(STRING, STRING, String, replace, STRING, "what", STRING, "forwhat", varray());
ADDFUNC2R(STRING, STRING, String, replacen, STRING, "what", STRING, "forwhat", varray());
+ ADDFUNC1R(STRING, STRING, String, repeat, INT, "count", varray());
ADDFUNC2R(STRING, STRING, String, insert, INT, "position", STRING, "what", varray());
ADDFUNC0R(STRING, STRING, String, capitalize, varray());
ADDFUNC3R(STRING, POOL_STRING_ARRAY, String, split, STRING, "delimiter", BOOL, "allow_empty", INT, "maxsplit", varray(true, 0));