uwildmat implemented in Rust.
No dependencies.
Heavily based on the original C version of uwildmat, which is part of InterNetNews (INN).
```toml
[dependencies] uwildmat = "0.2" ```
```rust // your_code.rs use uwildmat::simple::uwildmat as uwildmat;
let text = "foo"; let pattern = "foo"; asserteq!(uwildmat(text, pattern), true);
// or:
use uwildmat::regular::uwildmat as uwildmat;
let text = "foo"; let pattern = "foo"; asserteq!(uwildmat(text, pattern), true);
// or:
use uwildmat::poison::uwildmat as uwildmat;
let text = "foo"; let pattern = "foo"; asserteq!(uwildmat(text, pattern), true); ```
This module will not handle invalid UTF-8. INN's uwildmat will (technically) allow any byte sequences as input, even if it is invalid UTF-8.
Remember to use the nightly toolchain for this project:
console
$ rustup override set nightly
Then the usual:
console
$ cargo clean
$ cargo build
$ cargo test
$ cargo bench
The build script src/build.rs
downloads the INN uwildmat test
suite and processes it, generating an equivalent Rust test suite.