fn fromHex
The bytes of a hexadecimal text (spaces are ignored).
Example:
use std.ser { fromHex, textOf }
fn main() io {
print(textOf(&fromHex(&"4142")!)!)
}Output
AB
@intrinsic("ser.fromHex") pub(api) fn fromHex(s: &str) -> bytes | DecodeErrorSince. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
s | &str |
Returns
bytes
Errors
DecodeError@error
Effects
none declared (pure unless the body says otherwise)
Defined in: std/ser/ser.oxl:2366