Commit Graph

12 Commits

Author SHA1 Message Date
63debc635e fixed for mac improved readability 2025-10-08 19:22:20 +03:00
70b9505166 added global header 2025-10-06 14:36:00 +03:00
9ccb25dd26 added concept for iterators, reworked interface 2025-10-06 14:25:52 +03:00
8344b745b7 improved scanner interface 2025-10-06 14:21:52 +03:00
d2b64a52b0 added unlikely 2025-10-06 14:04:43 +03:00
e93a6dc214 Includes header for fixed-width integer types
Adds `#include ` to ensure platform-independent use of fixed-width integer types.
2025-10-05 15:56:35 +03:00
7329410f94 Uses std::ranges::find for pattern scanning
Replaces `std::find` with `std::ranges::find` for improved code consistency and potentially better performance when dealing with ranges.
2025-10-05 15:54:54 +03:00
7bb23d3f7a Uses parsed pattern size in pattern scan
Updates the pattern scan loop to iterate over the size of the parsed pattern, ensuring correct iteration when using parsed patterns.
2025-10-05 14:14:31 +03:00
932b0d8deb Adds pattern scanning functionality and corner case tests
Implements a pattern scanning feature that allows searching for byte patterns within a byte range.

Adds `scan_for_pattern` method to `PatternScanner` to locate a pattern within a byte span.

Adds corner case tests to verify functionality and handle invalid inputs.
2025-10-05 06:37:20 +03:00
64e6ba3632 Adds corner case tests for pattern scanning
Adds new test cases to cover additional scenarios for pattern scanning, including tests for leading/trailing whitespace and spacing variations to ensure robustness.
2025-10-04 18:43:05 +03:00
6319aa81ab Handles empty pattern strings
Skips processing when encountering an empty string slice during pattern scanning.
This prevents unexpected behavior and potential errors when the pattern string contains sections that result in an empty byte string.
2025-10-04 18:33:57 +03:00
544fa313c1 Adds pattern scanning functionality
Implements a pattern scanner for byte sequence parsing.

Introduces `omath::PatternScanner` to parse pattern strings, which represent byte sequences.
Adds support for wildcard characters ('?' and '?') to represent optional bytes in the pattern.
Includes unit tests for basic read operations to ensure proper functionality.
2025-10-04 18:30:43 +03:00