Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mwotton/minspan
https://github.com/mwotton/minspan
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/mwotton/minspan
- Owner: mwotton
- License: mit
- Created: 2021-09-03T06:39:48.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-29T02:40:10.000Z (3 months ago)
- Last Synced: 2024-10-12T02:58:36.195Z (28 days ago)
- Language: Rust
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# minspan
This is a tiny crate to find the minimal bounds of a string within another one.
The needle must be found in its entirety within the haystack, but there may be
any number of intervening characters that are just chaff. This is useful for
applications like fuzzy-completers, where a shorter match is generally preferable
("curl" matches "curl https://rust-lang.org" better than it matches "colossally
urban lapidarians").The interface is small but under flux, it's possible that a slice is a better
return value than bare integer indices.