fpas 0.5.3

fpas is command line software helps you create password from some text
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
pub fn chain_mode<T: Fn(String) -> String>(mode: T, msg: String) -> String {
    let (last_four, msg) = split_string(msg);

    format!("{}{}", msg, mode(last_four))
}

fn split_string(msg: String) -> (String, String) {
    let point = msg.len() - 4;
    let last_four = &msg[point..];
    let first_msg = &msg[..point];

    (last_four.to_string(), first_msg.to_string())
}