This commit is contained in:
Neelesh Chandola
2018-10-28 18:57:17 +05:30
committed by Andreas Rumpf
parent dfb8730f51
commit 95cc1abdc7

View File

@@ -909,7 +909,7 @@ proc toHex*(x: BiggestInt, len: Positive): string {.noSideEffect,
proc toHex*[T: SomeInteger](x: T): string =
## Shortcut for ``toHex(x, T.sizeOf * 2)``
runnableExamples:
doAssert toHex(1984) == "00000000000007C0"
doAssert toHex(1984'i64) == "00000000000007C0"
toHex(BiggestInt(x), T.sizeOf * 2)
proc toHex*(s: string): string {.noSideEffect, rtl.} =