1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

Expose String.get_slice

(cherry picked from commit e5725c7deb)
This commit is contained in:
kobewi
2021-10-31 15:36:16 +01:00
committed by Rémi Verschelde
parent 30f359ee3c
commit 7f91cbc397
2 changed files with 16 additions and 0 deletions

View File

@@ -245,6 +245,7 @@ struct _VariantCall {
VCALL_LOCALMEM3R(String, count);
VCALL_LOCALMEM3R(String, countn);
VCALL_LOCALMEM2R(String, substr);
VCALL_LOCALMEM2R(String, get_slice);
VCALL_LOCALMEM2R(String, find);
VCALL_LOCALMEM1R(String, find_last);
VCALL_LOCALMEM2R(String, findn);
@@ -1633,6 +1634,7 @@ void register_variant_methods() {
ADDFUNC1R(STRING, INT, String, naturalnocasecmp_to, STRING, "to", varray());
ADDFUNC0R(STRING, INT, String, length, varray());
ADDFUNC2R(STRING, STRING, String, substr, INT, "from", INT, "len", varray(-1));
ADDFUNC2R(STRING, STRING, String, get_slice, STRING, "delimiter", INT, "slice", varray());
ADDFUNC2R(STRING, INT, String, find, STRING, "what", INT, "from", varray(0));