diff options
author | Max Hilbrunner <mhilbrunner@users.noreply.github.com> | 2018-05-23 17:19:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-23 17:19:35 +0200 |
commit | acf6c326fb6a800040ac31da7cc37b9560571434 (patch) | |
tree | b50f15a1e298646c5b26874dc3593c53708ca496 /doc/classes | |
parent | f1e5a47fab3b6e305427deb9fac03e9295dd7b16 (diff) | |
parent | 6fe415ca7f439d56321d327dfdd18105a09a70d1 (diff) |
Merge pull request #14715 from Krakean/string_add_rsplit2
Added rsplit() method to String class
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/String.xml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/classes/String.xml b/doc/classes/String.xml index 83fb76f287..a55e184474 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -688,6 +688,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> |