Corelib
ByteArray
pub trait FormatAsByteArray
fn format_as_byte_array(self: @T, base: NonZero) -> ByteArray
use core::to_byte_array::FormatAsByteArray; let num: u32 = 42; let formatted = num.format_as_byte_array(16); assert!(formatted, "2a");
Was this page helpful?