summary refs log tree commit diff stats
path: root/README.asciidoc
diff options
context:
space:
mode:
authorFlaviu Tamas <tamasflaviu@gmail.com>2015-01-19 07:38:09 -0500
committerFlaviu Tamas <tamasflaviu@gmail.com>2015-01-19 07:38:09 -0500
commita938d42334822b78d4f84417d066f0f059dcf8ec (patch)
tree4a52fcf3c4d82751c040bc8099d8ecf82ae04669 /README.asciidoc
parent04699a7587dc83d37bd5e1618409cac11dc04f75 (diff)
downloadNim-a938d42334822b78d4f84417d066f0f059dcf8ec.tar.gz
Fix maxsplit to conform to perl
Diffstat (limited to 'README.asciidoc')
-rw-r--r--README.asciidoc5
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