4 releases

Uses old Rust 2015

0.2.2 Jan 1, 2020
0.2.1 Dec 31, 2019
0.2.0 Dec 30, 2019
0.1.0 Jan 31, 2018

#931 in Command-line interface

22 downloads per month

MIT license

5KB
85 lines

abbrev

Build Status Crates.io

Like Ruby's Abbrev module

Example

use abbrev::abbrev;

fn main() {
    let xs = vec!["foo", "fool", "folding", "flop"];
    let map = abbrev(&xs);

    println!("{:#?}", map);
}

And it will print:

{
    "fl": "flop",
    "flo": "flop",
    "flop": "flop",
    "fol": "folding",
    "fold": "folding",
    "foldi": "folding",
    "foldin": "folding",
    "folding": "folding",
    "foo": "foo",
    "fool": "fool"
}

License

MIT

No runtime deps