mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 06:11:29 +03:00
Added third argument for String.split() function (see issue #14349)
Remove negative limit, leave only positive and make it reflect behaviour like in Python Also limit renamed to maxsplit to match Python one. Also docs updated. Fix indent
This commit is contained in:
@@ -662,8 +662,11 @@
|
||||
</argument>
|
||||
<argument index="1" name="allow_empty" type="bool" default="True">
|
||||
</argument>
|
||||
<argument index="2" name="maxsplit" type="int" default="0">
|
||||
</argument>
|
||||
<description>
|
||||
Splits the string by a divisor string and returns an array of the substrings. Example "One,Two,Three" will return ["One","Two","Three"] if split by ",".
|
||||
If [code]maxsplit[/code] is given, at most maxsplit number of splits occur, and the remainder of the string is returned as the final element of the list (thus, the list will have at most maxsplit+1 elements)
|
||||
</description>
|
||||
</method>
|
||||
<method name="split_floats">
|
||||
|
||||
Reference in New Issue
Block a user