summaryrefslogtreecommitdiff
path: root/core/variant
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2022-08-12 16:21:15 +0200
committerkobewi <kobewi4e@gmail.com>2022-11-04 15:09:12 +0100
commit8a47a12207348ad332c4ed5987c0ba432ff5de5a (patch)
tree9bbefb784ec254802db5b3c117c9db57087c3ac2 /core/variant
parent191c8ed12f624ec97b650b2726fed4e8c4bcf04c (diff)
Add support for empty delimiter in String.split
Diffstat (limited to 'core/variant')
-rw-r--r--core/variant/variant_call.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp
index 7da46a2d05..91af2bab85 100644
--- a/core/variant/variant_call.cpp
+++ b/core/variant/variant_call.cpp
@@ -1509,8 +1509,8 @@ static void _register_variant_builtin_methods() {
bind_method(String, to_camel_case, sarray(), varray());
bind_method(String, to_pascal_case, sarray(), varray());
bind_method(String, to_snake_case, sarray(), varray());
- bind_method(String, split, sarray("delimiter", "allow_empty", "maxsplit"), varray(true, 0));
- bind_method(String, rsplit, sarray("delimiter", "allow_empty", "maxsplit"), varray(true, 0));
+ bind_method(String, split, sarray("delimiter", "allow_empty", "maxsplit"), varray("", true, 0));
+ bind_method(String, rsplit, sarray("delimiter", "allow_empty", "maxsplit"), varray("", true, 0));
bind_method(String, split_floats, sarray("delimiter", "allow_empty"), varray(true));
bind_method(String, join, sarray("parts"), varray());