3 releases
0.1.2 | Oct 14, 2024 |
---|---|
0.1.1 | Oct 3, 2024 |
0.1.0 | Sep 28, 2024 |
#740 in Text processing
604 downloads per month
28KB
610 lines
SM: Self matching search patterns
Regex are great, but for small casual search operations, they can be pretty annoying.
Example: you want to search for the string getID("carl")
. First, you need to escape the quotes.
Then, you might be unsure if it's getID
or getId
, so you need case insensitivity. Or maybe it's get_id
?
Then you end up having to do a lot of edits to your search string to create a nice Regex. SM is optimized for
exactly these cases: A lazy developer searching for a code snippet in a messy code base.
Use cargo install sm-search
to get the CLI tool. Or add this package with cargo add sm-search
to use this
as your in your own programs. You can look at src/main.rs
as example of how this library can be used.
Dependencies
~5–14MB
~170K SLoC