[go: up one dir, main page]

Crate reword[][src]

Expand description

Provides utility functions for human readable formatting of words and sentences.

let s = "(Even),Olsson&Rogstadkjærnet?";
assert_eq!(reword::name(s), "Even Olsson Rogstadkjærnet");
assert_eq!(reword::name_with_limit(s, 4), "EOR");
assert_eq!(reword::username_with_limit(s, 12), "evenor");
assert_eq!(reword::camel_case(s), "evenOlssonRogstadkjærnet");

Functions

Join the list with an ‘and’ before the last element of the list.

Formats the input string as a camel case name.

Formats the input string as a name.

Formats the input string as a name and limits the length of the name.

Join the list with an ‘or’ before the last element of the list.

Formats the input string as a pascal case name.

Creates a username from the provided string.

Creates a username from the provided string and limit.