Skip to main content

initials

Function initials 

Source
pub fn initials(name: &str, count: usize) -> String
Expand description

Initials from the first and last words, at most count of them.

Splits on characters, never bytes, so a name in any script cannot be cut mid-character. A combining mark that follows the first character is dropped; the initial stays legible.