Add space to fix RST in captureBetween docs (#5769)
This commit is contained in:
parent
202ecdeee8
commit
c24dc7944a
1 changed files with 1 additions and 1 deletions
|
|
@ -201,7 +201,7 @@ proc parseWhile*(s: string, token: var string, validChars: set[char],
|
|||
|
||||
proc captureBetween*(s: string, first: char, second = '\0', start = 0): string =
|
||||
## Finds the first occurrence of ``first``, then returns everything from there
|
||||
## up to ``second``(if ``second`` is '\0', then ``first`` is used).
|
||||
## up to ``second`` (if ``second`` is '\0', then ``first`` is used).
|
||||
var i = skipUntil(s, first, start)+1+start
|
||||
result = ""
|
||||
discard s.parseUntil(result, if second == '\0': first else: second, i)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue