wordbreaker

Crates.iowordbreaker
lib.rswordbreaker
version0.3.0
sourcesrc
created_at2022-09-12 06:57:25.193067
updated_at2022-09-19 22:25:21.029067
descriptionA Unicode-aware no_std crate (requires alloc) that rapidly finds all sequences of dictionary words that concatenate to a given string.
homepagehttps://crates.io/crates/wordbreaker
repositoryhttps://github.com/ChaiTRex/wordbreaker
max_upload_size
id663506
size1,076,626
Chai T. Rex (ChaiTRex)

documentation

https://docs.rs/wordbreaker

README

wordbreaker is a Unicode-aware no_std crate (requires alloc) that rapidly finds all sequences of dictionary words that concatenate to a given string.

Example

use wordbreaker::Dictionary;

let dictionary = Dictionary::new(&["hello", "just", "ice", "justice"]);
let mut ways_to_concatenate = dictionary
    .concatenations_for("justice")
    .collect::<Vec<_>>();

ways_to_concatenate.sort_unstable();
assert_eq!(ways_to_concatenate, [vec!["just", "ice"], vec!["justice"]]);
Commit count: 45

cargo fmt