[][src]Function str_slug::slug_hash

pub fn slug_hash<T: AsRef<str>>(value: T) -> String

Generate URL friendly slug of the given string, and append a hash to it.

Features

  • hash

Examples

use str_slug::slug_hash;

let slug = slug_hash("don’t let your life clubbed into dank submission. be on the watch, there are ways out.");
assert_eq!(slug, "don-t-let-your-life-clubbed-into-dank-submission-be-on-the-watch-there-are-ways-out_a2f4f4");