Adjust re for nre's inclusive bounds
This commit is contained in:
parent
dc60a51e15
commit
15ef227c48
1 changed files with 1 additions and 1 deletions
|
|
@ -97,7 +97,7 @@ template returnBounds(): stmt {.immediate, dirty.} =
|
||||||
return (m.matchBounds.a, <m.matchBounds.b)
|
return (m.matchBounds.a, <m.matchBounds.b)
|
||||||
|
|
||||||
template returnLength(): stmt {.immediate, dirty.} =
|
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],
|
proc findBounds*(s: string, pattern: Regex, matches: var openArray[string],
|
||||||
start = 0): tuple[first, last: int] =
|
start = 0): tuple[first, last: int] =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue