mirror of
https://github.com/status-im/nim-stint.git
synced 2025-02-20 10:58:21 +00:00
signed integer 'fromHex'
This commit is contained in:
parent
f902d117fc
commit
7dc26bb714
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user