ByteArray.
Signature
Trait functions
append_formatted_to_byte_array
Appends the ASCII representation of the value to the providedByteArray.
ByteArray.
pub trait AppendFormattedToByteArray
ByteArray.
fn append_formatted_to_byte_array(self: @T, ref byte_array: ByteArray, base: NonZero)
use core::to_byte_array::AppendFormattedToByteArray;
let mut buffer = "Count: ";
let num: u32 = 42;
num.append_formatted_to_byte_array(ref buffer, 10);
assert!(buffer == "Count: 42");
Was this page helpful?