This commit is contained in:
parent
a7aeabb9d2
commit
0944b0f441
11 changed files with 109 additions and 109 deletions
|
|
@ -97,7 +97,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],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue