[][src]Function reword::and_join

pub fn and_join<T: AsRef<str>>(v: &[T]) -> String

Join the list with an 'and' before the last element of the list.

Examples

assert_eq!(reword::and_join(&["a", "b"]), "a and b");
assert_eq!(reword::and_join(&["a", "b", "c"]), "a, b, and c");