reword/lib.rs
1//! Provides some utility functions for human-readable formatting of words.
2
3#![no_std]
4
5extern crate alloc;
6
7mod case;
8mod join;
9mod name;
10
11pub use case::*;
12pub use join::*;
13pub use name::*;
14
15use alloc::string::String;
16
17fn fold(mut acc: String, w: &str, ch: char) -> String {
18 if !acc.is_empty() {
19 acc.push(ch);
20 }
21 acc.push_str(w);
22 acc
23}