Documentation
¶
Overview ¶
Package slug provides utility functions for normalizing strings into "slugs". Slugs are lower-case, sanitized strings that are safe for use in sensitive environments like URLs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// Replace non-alphanumeric characters with this byte.
Replacement = '_'
)
Functions ¶
func Clean ¶
Slug replaces each run of characters which are not ASCII letters or numbers with the Replacement character, except for leading or trailing runs. Letters will be stripped of diacritical marks and lowercased. Letter or number codepoints that do not have combining marks or a lower-cased variant will be passed through unaltered.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.