chawyehsu / filenamify-rs

Convert a string to a valid filename
https://docs.rs/filenamify
Apache License 2.0
3 stars 2 forks source link
filename rust text-processing

filenamify

Convert a string to a valid filename

cicd docs-svg crates-svg deps-svg

Install

[dependencies]
filenamify = "0.1"

Examples

use filenamify::filenamify;
let safe_filename = filenamify("//foo/bar/file");
assert_eq!(safe_filename, "_foo_bar_file");

License

filenamify-rs © Chawye Hsu. Licensed under either of Apache-2.0 or MIT license at your option.

Blog · GitHub @chawyehsu · Twitter @chawyehsu