This commit is contained in:
narimiran 2020-07-06 10:55:51 +02:00
commit ebaf603c84
10 changed files with 85 additions and 85 deletions

View file

@ -122,7 +122,7 @@ proc bufSubstr(b: cstring, sPos, ePos: int): string {.inline.} =
## Don't assume cstring is '\0' terminated
let sz = ePos - sPos
result = newString(sz+1)
copyMem(addr(result[0]), unsafeAddr(b[sPos]), sz)
copyMem(addr(result[0]), unsafeaddr(b[sPos]), sz)
result.setLen(sz)
proc matchOrFind(buf: cstring, pattern: Regex, matches: var openArray[string],