[−][src]Function winconsole::console::fill_character
pub fn fill_character(
chr: char,
column: u16,
row: u16,
max_length: impl Into<Option<u32>>
) -> WinResult<u32>
Fills the console window with a specified character starting at a specified location, and returns the number of cells which were filled. Note that this only changes the character; the colors of each cell will remain the same.
Arguments
chr
- The character to fill the console with.column
- The column at which the fill should begin.row
- The row at which the fill should begin.max_length
- The maximum amount of cells to fill. If None, fill the entirety of the console from the start position.
Examples
Fills the entire console with 'Z'.
console::fill_character('Z', 0, 0, None).unwrap();
Fills the first ten cells with 'G'.
console::fill_character('G', 0, 0, 10).unwrap();
Errors
InvalidHandleError
: Returned if an invalid handle to the console output is retrieved or used.IoError
: Returned if an OS error occurs.