Skip to content

lffg-labs/patmat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basic and naive implementation of string basic pattern matching algorithms.

To run, install the Rust toolchain. Cargo may be used to compile the source.

Usage,

$ cargo run -q -- --help
Usage: patmat [OPTIONS] <PATTERN>

Arguments:
  <PATTERN>
          The pattern

Options:
  -a <ALGORITHM>
          The pattern matching algorithm

          [default: shift-and]
          [possible values: rabin-karp, shift-and]

      --stats
          Whether the program should show statistics

  -i <INPUT>
          The file to perform the search.

          If not passed, will read from the stdin.

  -h, --help
          Print help (see a summary with '-h')

  -V, --version
          Print version

Example,

$ cargo run -q -- --stats -i Cargo.toml path
80
108
146
(done in 20 μs)

About

Basic string searching algorithms in Rust.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages