mirror of
https://github.com/status-im/nim-stew.git
synced 2025-01-09 19:56:09 +00:00
Missed some generic procs in the previous commit due to late instantiation
This commit is contained in:
parent
a272986cb3
commit
c980d7592d
@ -78,11 +78,13 @@ func hexToByteArray*(hexStr: string, output: var openArray[byte])
|
|||||||
## Read a hex string and store it in a byte array `output`. No "endianness" reordering is done.
|
## Read a hex string and store it in a byte array `output`. No "endianness" reordering is done.
|
||||||
hexToByteArray(hexStr, output, 0, output.high)
|
hexToByteArray(hexStr, output, 0, output.high)
|
||||||
|
|
||||||
func hexToByteArray*[N: static[int]](hexStr: string): array[N, byte] {.noInit, inline.}=
|
func hexToByteArray*[N: static[int]](hexStr: string): array[N, byte]
|
||||||
|
{.raises: [ValueError, Defect], noInit, inline.}=
|
||||||
## Read an hex string and store it in a byte array. No "endianness" reordering is done.
|
## Read an hex string and store it in a byte array. No "endianness" reordering is done.
|
||||||
hexToByteArray(hexStr, result)
|
hexToByteArray(hexStr, result)
|
||||||
|
|
||||||
func hexToPaddedByteArray*[N: static[int]](hexStr: string): array[N, byte] =
|
func hexToPaddedByteArray*[N: static[int]](hexStr: string): array[N, byte]
|
||||||
|
{.raises: [ValueError, Defect].} =
|
||||||
## Read a hex string and store it in a byte array `output`.
|
## Read a hex string and store it in a byte array `output`.
|
||||||
## The string may be shorter than the byte array.
|
## The string may be shorter than the byte array.
|
||||||
## No "endianness" reordering is done.
|
## No "endianness" reordering is done.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user