Skip to main content

Crate slugify_filenames

Crate slugify_filenames 

Source
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§

Error

Functions§

slugify_string
slugify_string is the core function in this package.

Type Aliases§

Result