pub fn line_buffer(&self, line: usize) -> Option<&[char]> {
        if self.line_count() <= line {
            return None;
        }
        let buffer = self.buffer();
        let beginning = self.core.offset(line, 0).unwrap();
        let end = self.core
            .offset(line, self.line_width(line).unwrap())
            .unwrap();
        Some(&buffer[beginning..end])
    }
/// Returns a line of the buffer.
///
/// # Examples
///
/// ```
/// # use edit::editor::Editor;
/// let mut editor = Editor::new("a\n\
///                               b b b b\n\
///                               c", 1, 6).unwrap();
/// assert_eq!(editor.line_buffer(2), Some(&['c'][..]));
/// ```
Returns a line of the buffer.
Returns a line of the buffer .
pub fn line_buffer(&self, line: usize) -> Option<&[char]> {
        if self.line_count() <= line {
            return None;
        }
        let buffer = self.buffer();
        let beginning = self.core.offset(line, 0).unwrap();
        let end = self.core
            .offset(line, self.line_width(line).unwrap())
            .unwrap();
        Some(&buffer[beginning..end])
    }
pub fn line_buffer ( & self , line : usize ) -> Option < & [ char ] > { if self . line_count ( ) <= line { return None ; } let buffer = self . buffer ( ) ; let beginning = self . core . offset ( line , 0 ) . unwrap ( ) ; let end = self . core . offset ( line , self . line_width ( line ) . unwrap ( ) ) . unwrap ( ) ; Some ( & buffer [ beginning .. end ] ) }
Returns a line of the buffer.
Returns a line of the buffer .
&self
line
usize
&self
line
usize
examples
None
use edit::editor::editor;
None