Slugly (slugly v0.1.0)

Copy Markdown View Source

A tiny library for turning strings into URL-friendly slugs.

Summary

Functions

Converts a string into a lowercase, hyphen-separated slug.

Functions

slug(string)

@spec slug(String.t()) :: String.t()

Converts a string into a lowercase, hyphen-separated slug.

Examples

iex> Slugly.slug("Hello, World!")
"hello-world"

iex> Slugly.slug("  Café   Déjà Vu  ")
"cafe-deja-vu"