OxL Reference

fn fromHex

The bytes of a hexadecimal text (spaces are ignored).

Example:

oxl✓ checked in CI
use std.ser { fromHex, textOf }

fn main() io {
  print(textOf(&fromHex(&"4142")!)!)
}
Output
AB
@intrinsic("ser.fromHex") pub(api) fn fromHex(s: &str) -> bytes | DecodeError

Since. 1.0.0-beta

Parameters

NameType
s&str

Returns

bytes

Errors

Effects

none declared (pure unless the body says otherwise)

Defined in: std/ser/ser.oxl:2366

See also