From cd15418315e47ad8ccc5af5af5c076f823434397 Mon Sep 17 00:00:00 2001 From: Audrey Dutcher Date: Tue, 27 Dec 2022 15:33:13 -0800 Subject: [PATCH] Add BufferLine::into_text --- src/buffer_line.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/buffer_line.rs b/src/buffer_line.rs index 83ebe28..242db25 100644 --- a/src/buffer_line.rs +++ b/src/buffer_line.rs @@ -50,6 +50,11 @@ impl BufferLine { } } + /// Consume this line, returning only its text contents as a String. + pub fn into_text(self) -> String { + self.text + } + /// Get attributes list pub fn attrs_list(&self) -> &AttrsList { &self.attrs_list