This commit is contained in:
Aleksey Kladov 2018-08-28 22:58:02 +03:00
parent 69eeae0c99
commit ba02a55330
2 changed files with 8 additions and 35 deletions

View file

@ -31,6 +31,9 @@ impl<'a> SyntaxText<'a> {
Some(&text[range])
})
}
pub fn push_to(&self, buf: &mut String) {
self.chunks().for_each(|it| buf.push_str(it));
}
pub fn to_string(&self) -> String {
self.chunks().collect()
}