1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mod html_escape; mod table_align; mod text_align; mod text_escape; pub use html_escape::*; pub use table_align::*; pub use text_align::*; pub use text_escape::*; pub fn capitalize_first_letter(text: impl AsRef<str>) -> String { let text = text.as_ref(); let mut c = text.chars(); match c.next() { None => String::new(), Some(f) => f.to_uppercase().collect::<String>() + c.as_str(), } }