Make second parameter of substr optional

This commit is contained in:
Tomasz Chabora
2019-05-03 14:21:04 +02:00
parent 913620a9b8
commit 0b8a785539
4 changed files with 7 additions and 4 deletions

View File

@@ -1494,7 +1494,7 @@ void register_variant_methods() {
ADDFUNC1R(STRING, INT, String, casecmp_to, STRING, "to", varray());
ADDFUNC1R(STRING, INT, String, nocasecmp_to, STRING, "to", varray());
ADDFUNC0R(STRING, INT, String, length, varray());
ADDFUNC2R(STRING, STRING, String, substr, INT, "from", INT, "len", varray());
ADDFUNC2R(STRING, STRING, String, substr, INT, "from", INT, "len", varray(-1));
ADDFUNC2R(STRING, INT, String, find, STRING, "what", INT, "from", varray(0));