diff options
author | Flaviu Tamas <tamasflaviu@gmail.com> | 2015-05-26 19:48:58 -0400 |
---|---|---|
committer | Flaviu Tamas <tamasflaviu@gmail.com> | 2015-06-07 13:13:04 -0400 |
commit | 15ef227c48417819fab86c86103565e2a324ad92 (patch) | |
tree | 01b5f1f0d559661975d7c7e79857c5ee0ac907ce /lib/impure/re.nim | |
parent | dc60a51e1545d8c73bc9415d1045864b72cfda0b (diff) | |
download | Nim-15ef227c48417819fab86c86103565e2a324ad92.tar.gz |
Adjust re for nre's inclusive bounds
Diffstat (limited to 'lib/impure/re.nim')
-rw-r--r-- | lib/impure/re.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/impure/re.nim b/lib/impure/re.nim index a2689a45c..5ee6e7005 100644 --- a/lib/impure/re.nim +++ b/lib/impure/re.nim @@ -97,7 +97,7 @@ template returnBounds(): stmt {.immediate, dirty.} = return (m.matchBounds.a, <m.matchBounds.b) template returnLength(): stmt {.immediate, dirty.} = - return m.matchBounds.b - m.matchBounds.a + return m.matchBounds.b - m.matchBounds.a + 1 proc findBounds*(s: string, pattern: Regex, matches: var openArray[string], start = 0): tuple[first, last: int] = |