/// Writes the given ASCII string to the buffer.
///
/// Wraps lines at `BUFFER_WIDTH`. Supports the `\n` newline character. Does **not**
/// support strings with non-ASCII characters, since they can't be printed in the VGA text
/// mode.
Writes the given ASCII string to the buffer.
Wraps lines at `BUFFER_WIDTH`. Supports the `\n` newline character. Does **not
support strings with non-ASCII characters, since they can't be printed in the VGA text
mode.
Writes the given ASCII string to the buffer . Wraps lines at ` BUFFER_WIDTH ` . Supports the ` \ n ` newline character . Does ** not support strings with non - ASCII characters since they can ' t be printed in the VGA text mode .
fn write_string(&mut self, s: &str) {
        s.bytes().into_iter().for_each(|byte| match byte {
            // printable ASCII byte or newline
            0x20..=0x7e | b'\n' => self.write_byte(byte),
            // not part of printable ASCII range
            _ => self.write_byte(0xfe),
        });
    }
fn write_string ( & mut self , s : & str ) { s . bytes ( ) . into_iter ( ) . for_each ( | byte | match byte { // printable ASCII byte or newline 0x20 ..= 0x7e | b'\n' => self . write_byte ( byte ) , // not part of printable ASCII range _ => self . write_byte ( 0xfe ) , } ) ; }
Writes the given ASCII string to the buffer.
Writes the given ASCII string to the buffer .
&mut self
s
&str