fromHexString
lib.fromHexString
Docs pulled from | This Revision | 43 minutes ago
Convert a hexadecimal string to it's integer representation.
Type
fromHexString :: String -> [ String ]
Examples
fromHexString "FF"
=> 255
fromHexString (builtins.hashString "sha256" "test")
=> 9223372036854775807
Noogle detected
Implementation
The following is the current implementation of this function.
fromHexString = value:
let
noPrefix = lib.strings.removePrefix "0x" (lib.strings.toLower value);
in let
parsed = builtins.fromTOML "v=0x${noPrefix}";
in parsed.v;