Crates.io | patterns |
lib.rs | patterns |
version | |
source | src |
created_at | 2023-04-07 15:46:51.123116+00 |
updated_at | 2025-05-02 14:47:16.06212+00 |
description | no_std compatible pattern scan library using simd |
homepage | |
repository | https://github.com/greaka/patterns |
max_upload_size | |
id | 832986 |
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` |
size | 0 |
Allows you to search for a pattern within data via an iterator interface.
This library uses the core::simd abstraction and does not allocate.
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
}