| 1 | //! Provides some utility functions for human-readable formatting of words. |
| 2 | |
| 3 | #![no_std] |
| 4 | |
| 5 | extern crate allocrust-analyzer cargo reword 7.0.1 alloc/; |
| 6 | |
| 7 | mod caserust-analyzer cargo reword 7.0.1 case/; |
| 8 | mod joinrust-analyzer cargo reword 7.0.1 join/; |
| 9 | mod namerust-analyzer cargo reword 7.0.1 name/; |
| 10 | |
| 11 | pub use caserust-analyzer cargo reword 7.0.1 case/::*; |
| 12 | pub use joinrust-analyzer cargo reword 7.0.1 join/::*; |
| 13 | pub use namerust-analyzer cargo reword 7.0.1 name/::*; |
| 14 | |
| 15 | use allocrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc crate/::stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/::Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#; |
| 16 | |
| 17 | fn foldrust-analyzer cargo reword 7.0.1 fold().(mut acc: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, w: &str, ch: char) -> Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String# { |
| 18 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().acc.is_emptyrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]is_empty().() { |
| 19 | acc.pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]push().(ch); |
| 20 | } |
| 21 | acc.push_strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]push_str().(w); |
| 22 | acc |
| 23 | } |