summary refs log tree commit diff stats
path: root/README.asciidoc
diff options
context:
space:
mode:
authorFlaviu Tamas <tamasflaviu@gmail.com>2015-01-18 12:18:43 -0500
committerFlaviu Tamas <tamasflaviu@gmail.com>2015-01-18 12:18:43 -0500
commitff2e3de580e798c4061b8b8a359392974c9091a0 (patch)
treeb6c7dfe3d4664b189fa65d829c5bf850aada4b11 /README.asciidoc
parent0aaad199a47405a4bf6faca256d0a905ab9b893c (diff)
downloadNim-ff2e3de580e798c4061b8b8a359392974c9091a0.tar.gz
Make find more prominent
Diffstat (limited to 'README.asciidoc')
-rw-r--r--README.asciidoc19
1 files changed, 9 insertions, 10 deletions
diff --git a/README.asciidoc b/README.asciidoc
index 5a5b7d41a..877ffce47 100644
--- a/README.asciidoc
+++ b/README.asciidoc
@@ -23,23 +23,22 @@ provides in its standard library is inadequate:
 
 === Operations
 
-[[proc-match]]
-==== match(string, Regex, start = 0, endpos = -1): RegexMatch
+[[proc-find]]
+==== find(string, Regex, start = 0, endpos = -1): RegexMatch
 
-Tries to match the pattern, starting at start. This means that
-`"foo".match(re"f") == true`, but `"foo".match(re"o") == false`.
+Finds the given pattern in the string between the end and start positions.
 
 `start` :: The start point at which to start matching. `|abc` is `0`; `a|bc`
    is `1`
 `endpos` :: The maximum index for a match; `-1` means the end of the string,
    otherwise it's an exclusive upper bound.
 
-[[proc-find]]
-==== find(string, Regex, start = 0, endpos = -1): RegexMatch
+[[proc-match]]
+==== match(string, Regex, start = 0, endpos = -1): RegexMatch
 
-Finds the given pattern in the string. Bounds work the same as for
-link:#proc-match[`match(...)`], but instead of being anchored to the start of
-the string, it can match at any point between `start` and `endpos`.
+Like link:#proc-find[`find(...)`], but anchored to the start of the string.
+This means that `"foo".match(re"f") == true`, but `"foo".match(re"o") ==
+false`.
 
 [[iter-find]]
 ==== iterator findIter(string, Regex, start = 0, endpos = -1): RegexMatch
@@ -47,7 +46,7 @@ the string, it can match at any point between `start` and `endpos`.
 Works the same as link:#proc-find[`find(...)`], but finds every non-overlapping
 match. `"2222".find(re"22")` is `"22", "22"`, not `"22", "22", "22"`.
 
-Arguments are the same as link:#proc-match[`match(...)`]
+Arguments are the same as link:#proc-find[`find(...)`]
 
 Variants: