Expand description
§Usage Example
use slugify_filenames::slugify_string;
// passing `false` in the second argument to prevent downcasing the string
let result = slugify_string("Imagine Thís STRING, àscii Safê and Filename-sáfè", false)?;
assert_eq!(result, "Imagine-This-STRING-ascii-Safe-and-Filename-safe");
// passing `true` in the second argument to downcase the string
let result = slugify_string("Generated_FILE_ymf1a3ymf1a3ymf1.png.0.gz", true)?;
assert_eq!(result, "generated_file_ymf1a3ymf1a3ymf1.png.gz");
Enums§
Functions§
- slugify_
string slugify_stringis the core function in this package.