commit
b89c8df35e
1 changed files with 5 additions and 3 deletions
|
|
@ -836,9 +836,11 @@ iterator findAll*(s: string, pattern: TPeg, start = 0): string =
|
|||
while i < s.len:
|
||||
c.ml = 0
|
||||
var L = rawMatch(s, pattern, i, c)
|
||||
if L < 0: break
|
||||
yield substr(s, i, i+L-1)
|
||||
inc(i, L)
|
||||
if L < 0:
|
||||
inc(i, 1)
|
||||
else:
|
||||
yield substr(s, i, i+L-1)
|
||||
inc(i, L)
|
||||
|
||||
proc findAll*(s: string, pattern: TPeg, start = 0): seq[string] {.
|
||||
nosideEffect, rtl, extern: "npegs$1".} =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue