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

View file

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