pub fn extra_offset(text: &str, shape: Shape) -> usize {
    match text.rfind('\n') {
        // 1 for newline character
        Some(idx) => text.len().saturating_sub(idx + 1 + shape.used_width()),
        None => text.len(),
    }
}
// Computes the length of a string's last line, minus offset.
Computes the length of a string's last line, minus offset.
Computes the length of a string ' s last line minus offset .
pub fn extra_offset(text: &str, shape: Shape) -> usize {
    match text.rfind('\n') {
        // 1 for newline character
        Some(idx) => text.len().saturating_sub(idx + 1 + shape.used_width()),
        None => text.len(),
    }
}
pub fn extra_offset ( text : & str , shape : Shape ) -> usize { match text . rfind ( '\n' ) { // 1 for newline character Some ( idx ) => text . len ( ) . saturating_sub ( idx + 1 + shape . used_width ( ) ) , None => text . len ( ) , } }
Computes the length of a string's last line, minus offset.
Computes the length of a string ' s last line minus offset .
text
&str
shape
Shape
text
&str
shape
Shape