Added rsplit() for String class

Docs updated
This commit is contained in:
Dmitry Koteroff
2017-12-15 22:23:58 +03:00
parent 7767d89c45
commit 6fe415ca7f
4 changed files with 57 additions and 0 deletions

View File

@@ -669,6 +669,20 @@
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="rsplit">
<return type="PoolStringArray">
</return>
<argument index="0" name="divisor" type="String">
</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 [code]divisor[/code] string and returns an array of the substrings, starting from right. Example "One,Two,Three" will return ["One","Two","Three"] if split by ",".
If [code]maxsplit[/code] is specified, then it is number of splits to do, default is 0 which splits all the items.
</description>
</method>
<method name="split_floats">
<return type="PoolRealArray">
</return>