hco 0.0.0-1

LIB: Math and container utilities for Rust. Notice: study purpose, not production ready.
Documentation
1
2
3
4
5
6
7
8
9
pub fn regular_past_tense(verb: &str) -> String {
    if verb.ends_with('e') {
        format!("{}d", verb)
    } else if verb.ends_with('y') {
        format!("{}ied", &verb[..verb.len() - 1])
    } else {
        format!("{}ed", verb)
    }
}