Skip to main content

fold_bytes

Function fold_bytes 

Source
pub fn fold_bytes(
    data: &[u8],
    width: usize,
    count_bytes: bool,
    break_at_spaces: bool,
    out: &mut impl Write,
) -> Result<()>
Expand description

Fold (wrap) lines to a given width.

Modes:

  • bytes mode (-b): count bytes, break at byte boundaries
  • default mode: count columns (tab = advance to next tab stop, backspace = decrement)

If spaces (-s): break at the last space within the width instead of mid-word.