stew is collection of utilities, std library extensions and budding libraries that are frequently used at Status, but are too small to deserve their own git repository.
139
stars
18
forks
source link
rm copy of parseHex() from 1.2+ stdlib; some proc -> func #197
@@ -1,6 +1,5 @@
-# From: https://github.com/nim-lang/Nim/pull/11067/
-proc parseHex*[T: SomeInteger](s: string, number: var T, start = 0, maxLen = 0): int
- {.inline, noSideEffect.} =
+proc parseHex*[T: SomeInteger](s: string, number: var T, start = 0,
+ maxLen = 0): int {.noSideEffect.} =
## Parses a hexadecimal number and stores its value in ``number``.
##
## Returns the number of the parsed characters or 0 in case of an error.
so unless the .inline. here but not in the stdlib version is important, they're identical, including formatting.
comparing it with https://github.com/nim-lang/Nim/blob/version-1-2/lib/pure/parseutils.nim#L156:
so unless the
.inline.
here but not in the stdlib version is important, they're identical, including formatting.