mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-15 15:44:14 +00:00
Adjust re for nre's inclusive bounds
This commit is contained in:
@@ -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] =
|
||||
|
||||
Reference in New Issue
Block a user