From 5302fd125b36d453615483f6ced4e40e973c499a Mon Sep 17 00:00:00 2001 From: Dmitry Koteroff Date: Tue, 12 Dec 2017 05:14:38 +0300 Subject: 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 --- doc/classes/String.xml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc/classes') diff --git a/doc/classes/String.xml b/doc/classes/String.xml index 78e9f3cd3..8bbd52b41 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -662,8 +662,11 @@ + + 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) -- cgit v1.2.3-70-g09d2