Generate a URL friendly 'slug' from the given string
str_slug generates url friendly slug
from the given string.
Features
- correct unicode support.
- ability to append/prepend a hash of the given value to the generated slug.
- provide a simple to use apis
slug,slug_hash,slag_hash_len - fully customizable when you need it via
StrSlug::new
Examples
For more examples please check the Documentation
Simple usage
NORMAL
use slug;
let slug = slug;
assert_eq!;
WITH HASH
use slug_hash;
let slug = slug_hash_len;
assert_eq!;
Options
Defaults
trim_separator will take precedence when set to true.