[][src]Function reword::or_join

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

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

Examples

assert_eq!(reword::or_join(&["a", "b"]), "a or b");
assert_eq!(reword::or_join(&["a", "b", "c"]), "a, b, or c");