https://github.com/williamvenner/fuzzypath
๐งน Quick & dirty fuzzy path comparison
https://github.com/williamvenner/fuzzypath
cmp comparison eq fuzz fuzzy partialeq path pathbuf rust
Last synced: about 1 month ago
JSON representation
๐งน Quick & dirty fuzzy path comparison
- Host: GitHub
- URL: https://github.com/williamvenner/fuzzypath
- Owner: WilliamVenner
- License: mit
- Created: 2021-10-17T17:24:55.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-10-17T17:51:10.000Z (over 3 years ago)
- Last Synced: 2024-10-11T11:34:57.083Z (7 months ago)
- Topics: cmp, comparison, eq, fuzz, fuzzy, partialeq, path, pathbuf, rust
- Language: Rust
- Homepage: https://crates.io/crates/fuzzypath
- Size: 7.81 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://crates.io/crates/fuzzypath)
[](https://docs.rs/fuzzypath)
# ๐งน `fuzzypath`
Quick & dirty fuzzy path comparison
# Comparison rules
* โ Case insensitive
* โ Backslashes are normalized to forward slashes
* โ Trailing slashes are removed, except for root slash (for absolute POSIX paths)
* โ Repeating slashes are normalized to a single slash
* โ Comparing a Windows path with a POSIX path will not work if either is absolute (Windows paths with a drive letter, POSIX paths with a preceeding slash)
* โ Comparing a Windows UNC path will not work with any POSIX path
* โ POSIX paths can contain backslashes in file names, but Windows paths cannot - these will be normalized to forward slashes and you will lose that information# Usage
Add `fuzzypath` to your Cargo.toml dependencies:
```toml
[dependencies]
fuzzypath = "1"
```# Serde
To enable Serde serialization and deserialization, use the crate feature `serde`
```toml
[dependencies]
fuzzypath = { version = "1", features = ["serde"] }
```