[][src]Function inkling::copy_lines_into_string

pub fn copy_lines_into_string(line_buffer: &LineBuffer) -> String

Read all text from lines in a buffer into a single string and return it.

Examples

let content = "\
Gamle gode Väinämöinen
rustade sig nu att resa
bort till kyligare trakter
till de dunkla Nordanlanden.
";

let mut story = read_story_from_string(content).unwrap();
let mut line_buffer = Vec::new();

story.start(&mut line_buffer);

let text = copy_lines_into_string(&line_buffer);
assert_eq!(&text, content);