Skip to content

arniu/abbrev-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Like Ruby's Abbrev module

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages