signed integer 'fromHex'

This commit is contained in:
andri lim 2019-10-22 16:38:23 +07:00 committed by zah
parent f902d117fc
commit 7dc26bb714
1 changed files with 1 additions and 1 deletions

View File

@ -183,7 +183,7 @@ func parse*[bits: static[int]](input: string, T: typedesc[Stint[bits]], radix: s
else:
result = convert[T](no_overflow)
func fromHex*(T: type StUint, s: string): T {.inline.} =
func fromHex*(T: typedesc[StUint|Stint], s: string): T {.inline.} =
## Convert an hex string to the corresponding unsigned integer
parse(s, type result, radix = 16)