aboutsummaryrefslogtreecommitdiffstats
path: root/src/linebuf.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/linebuf.rs')
-rw-r--r--src/linebuf.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/linebuf.rs b/src/linebuf.rs
index f5bd95f..6ba619a 100644
--- a/src/linebuf.rs
+++ b/src/linebuf.rs
@@ -88,6 +88,10 @@ impl LineBuf {
self.post = Vec::new();
}
+ pub fn pre(&self) -> &[u8] {
+ &self.pre
+ }
+
pub fn into_bytes(&self) -> Vec<u8> {
let mut buf = Vec::with_capacity(self.pre.len() + self.post.len());
buf.extend_from_slice(&self.pre);