patterns

Crates.iopatterns
lib.rspatterns
version
sourcesrc
created_at2023-04-07 15:46:51.123116+00
updated_at2025-05-02 14:47:16.06212+00
descriptionno_std compatible pattern scan library using simd
homepage
repositoryhttps://github.com/greaka/patterns
max_upload_size
id832986
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
(greaka)

documentation

README

Pattern matching library

Allows you to search for a pattern within data via an iterator interface.

This library uses the core::simd abstraction and does not allocate.

Usage

use patterns::Pattern;

let data = [0_u8; 1_000_00];
// Allows . and ? as wildcard.
// Any number of wildcard characters between spaces is considered a wildcard byte.
let pattern: Pattern = "01 02 00 ? 59 ff".parse().unwrap();
let mut iterator = pattern.matches(&data);

for _found in iterator {
    // use _found
}
Commit count: 19

cargo fmt