Added ftpclient module. Fixed docs in sockets module. Added dll tests to test suite.

This commit is contained in:
dom96 2011-11-04 00:22:04 +00:00
commit 264de4537e
7 changed files with 394 additions and 10 deletions

View file

@ -164,6 +164,13 @@ proc parseWhile*(s: string, token: var string, validChars: set[char],
result = i-start
token = substr(s, start, i-1)
proc captureBetween*(s: string, first: char, second = '\0', i = 0): string =
## Finds the first occurence of ``first``, then returns everything from there
## up to ``second``(if ``second`` is '\0', then ``first`` is used).
var i = skipUntil(s, first, i)+1
result = ""
discard s.parseUntil(result, if second == '\0': first else: second, i)
{.push overflowChecks: on.}
# this must be compiled with overflow checking turned on:
proc rawParseInt(s: string, b: var biggestInt, start = 0): int =