Skip to main content

capitalize_first

Function capitalize_first 

pub fn capitalize_first(value: &str) -> String
Expand description

Upper-case the first character (by Unicode case mapping, so ß becomes SS) and keep the rest unchanged.

use tilo_ui::format::capitalize_first;
assert_eq!(capitalize_first("ada lovelace"), "Ada lovelace");
assert_eq!(capitalize_first(""), "");