mirror of
https://github.com/Yu-Vitaqua-fer-Chronos/NULID.git
synced 2024-11-21 22:12:46 +00:00
Minor patch for far future proofing
This commit is contained in:
parent
37420ad406
commit
7e5474c575
|
@ -1,6 +1,6 @@
|
|||
# Package
|
||||
|
||||
version = "0.2.0"
|
||||
version = "0.2.1"
|
||||
author = "Yu Vitaqua fer Chronos"
|
||||
description = "An implementation of ULID!"
|
||||
license = "CC0"
|
||||
|
|
|
@ -106,4 +106,7 @@ proc parseNulid*(ulidStr: string): NULID =
|
|||
result.randomness = UInt128.decode(ulidStr[10..25])
|
||||
|
||||
proc `$`*(ulid: NULID): string =
|
||||
result = '0' & Int128.encode(ulid.toInt128(), 26)
|
||||
result = Int128.encode(ulid.toInt128(), 26)
|
||||
|
||||
if result.len < 26:
|
||||
result.insert("0")
|
||||
|
|
Loading…
Reference in a new issue