/// Format output for pretty-printing to the console
Format output for pretty-printing to the console
Format output for pretty - printing to the console
pub fn format_output(output: Vec<AsciiUppercaseByte>) -> String {
    // Split the output into chunks of 5 bytes seperated by a space
    let mut formatted = Vec::new();
    for (i, value) in output.into_iter().enumerate() {
        // Add white space every 5 elements
        if i % 5 == 0 && i != 0 { 
            formatted.push(b' ');
        }
        // Add a new line every 25 elements
        if i % 25 == 0 && i!= 0 {
            formatted.push(b'\n');
        }
        formatted.push(value.get_byte());
    }
    String::from_utf8(formatted).unwrap()
}
pub fn format_output ( output : Vec < AsciiUppercaseByte > ) -> String { // Split the output into chunks of 5 bytes seperated by a space let mut formatted = Vec :: new ( ) ; for ( i , value ) in output . into_iter ( ) . enumerate ( ) { // Add white space every 5 elements if i % 5 == 0 && i != 0 { formatted . push ( b' ' ) ; } // Add a new line every 25 elements if i % 25 == 0 && i != 0 { formatted . push ( b'\n' ) ; } formatted . push ( value . get_byte ( ) ) ; } String :: from_utf8 ( formatted ) . unwrap ( ) }
Format output for pretty-printing to the console
Format output for pretty - printing to the console
output
Vec<AsciiUppercaseByte>