Documentation
¶
Overview ¶
Package slug transforms strings into a normalized form well suited for use in URLs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsSlugAscii ¶
IsSlugAscii returns true only if SlugAscii(s) == s.
func Slug ¶
Slug replaces each run of characters which are not unicode letters or numbers with a single hyphen, 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.
func SlugAscii ¶
SlugAscii is identical to Slug, except that runs of one or more unicode letters or numbers that still fall outside the ASCII range will have their UTF-8 representation hex encoded and delimited by hyphens. As with Slug, in no case will hyphens appear at either end of the returned string.
Types ¶
This section is empty.