Std.Hex
8 public declarations
- asciiToNibble
UInt8 -> Option[Int]Converts an ASCII character byte to its 4-bit numeric nibble value (0..15).
- byteToHex
UInt8 -> Bool -> (UInt8, UInt8)Splits a byte into two ASCII hex character bytes (high nibble, low nibble).
- decode
Str -> Option[Array[UInt8]]Decodes an even-length hexadecimal string into an array of bytes.
- decodeWithPrefix
Str -> Option[Array[UInt8]]Decodes a hexadecimal string, skipping an optional leading '0x' or '0X' prefix.
- encode
&Array[UInt8] -> StrEncodes an array of bytes into a lowercase hexadecimal string.
- encodeUpper
&Array[UInt8] -> StrEncodes an array of bytes into an uppercase hexadecimal string.
- isValid
Str -> BoolChecks whether `hexStr` consists of an even number of valid hex digits.
- nibbleToAscii
Int -> Bool -> UInt8Converts a 4-bit numeric nibble (0..15) into an ASCII character byte.
