Function tabled::multiline [−][src]
pub fn multiline<F: 'static + Fn(&str) -> String>(
f: F
) -> Box<dyn Fn(&str) -> String>
Expand description
Multiline a helper function for changing multiline content of cell by rows not as a whole.
use tabled::{Table, Format, multiline, Full, Modify}; let data: Vec<&'static str> = Vec::new(); let table = Table::new(&data) .with(Modify::new(Full).with(Format(multiline(|s| format!("{}", s))))) .to_string();