mirror of
https://github.com/Yu-Vitaqua-fer-Chronos/NULID.git
synced 2024-11-21 22:12:46 +00:00
Fixed doc gen
This commit is contained in:
parent
61b4312bad
commit
4ed2d4aab3
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
tests/test1
|
||||
htmldocs/
|
|
@ -144,10 +144,10 @@ func toBytes*(ulid: NULID): array[16, byte] =
|
|||
## Allows for a NULID to be converted to a byte array.
|
||||
runnableExamples:
|
||||
let
|
||||
nulid = parseNulid("01H999MBGTEA8BDS0M5AWEBB1A")
|
||||
nulidBytes = [1.byte, 138, 82, 154, 46, 26, 114, 144, 182, 228, 20, 42, 184, 229, 172, 42]
|
||||
ulid = parseNulid("01H999MBGTEA8BDS0M5AWEBB1A")
|
||||
ulidBytes = [1.byte, 138, 82, 154, 46, 26, 114, 144, 182, 228, 20, 42, 184, 229, 172, 42]
|
||||
|
||||
echo nulid == NULID.fromBytes(nulidBytes)
|
||||
echo ulid == NULID.fromBytes(ulidBytes)
|
||||
|
||||
when cpuEndian == littleEndian:
|
||||
return cast[array[16, byte]](ulid.toInt128().swapBytes())
|
||||
|
|
Loading…
Reference in a new issue