diff options
Diffstat (limited to 'README.asciidoc')
-rw-r--r-- | README.asciidoc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/README.asciidoc b/README.asciidoc index dd7b78dc7..51f616b4e 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -63,8 +63,9 @@ Perl and Javascript use. `"123".split(r"") == @["1", "2", "3"]`. - If the pattern has a capture in it, it is added after the string split: `"12".split(re"(\d)") == @["", "1", "", "2", ""]`. - - If `maxsplit != -1`, then the string will only be split `maxsplit` times. - `"1.2.3".split(re"\.", maxsplit = 1) == @["1", "2.3"]` + - If `maxsplit != -1`, then the string will only be split `maxsplit - 1` + times. This means that there will be `maxsplit` strings in the output seq. + `"1.2.3".split(re"\.", maxsplit = 2) == @["1", "2.3"]` [[proc-replace]] ==== replace(string, Regex, sub): string |