mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
[3.2] Add natural string comparison
This commit is contained in:
parent
6b5102cf90
commit
460e1b94c3
2 changed files with 15 additions and 0 deletions
|
@ -237,6 +237,7 @@ struct _VariantCall {
|
|||
|
||||
VCALL_LOCALMEM1R(String, casecmp_to);
|
||||
VCALL_LOCALMEM1R(String, nocasecmp_to);
|
||||
VCALL_LOCALMEM1R(String, naturalnocasecmp_to);
|
||||
VCALL_LOCALMEM0R(String, length);
|
||||
VCALL_LOCALMEM3R(String, count);
|
||||
VCALL_LOCALMEM3R(String, countn);
|
||||
|
@ -1557,6 +1558,7 @@ void register_variant_methods() {
|
|||
/* STRING */
|
||||
ADDFUNC1R(STRING, INT, String, casecmp_to, STRING, "to", varray());
|
||||
ADDFUNC1R(STRING, INT, String, nocasecmp_to, STRING, "to", varray());
|
||||
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));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue