slugify

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2019 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OK = "-_"
View Source
var TO_DASH = "/\\—–.~!@#$%^&*(){}[]+=?><;:`"

Functions

func IDify

func IDify(text string, maxLen int) string

IDify a string. The result will only contain ASCII letters, digits and dashes. It will not begin or end with a dash, and it will not contain runs of multiple dashes.

It is forced into being ASCII, but may contain any Unicode characters, with the above restrictions.

func SanatizeText

func SanatizeText(text string) string

func Slugify

func Slugify(text string, maxLen int) string

Slugify a string. The result will only contain lowercase letters, digits and dashes. It will not begin or end with a dash, and it will not contain runs of multiple dashes.

It is NOT forced into being ASCII, but may contain any Unicode characters, with the above restrictions.

Types

This section is empty.

Directories

Path Synopsis
cmd
slugify Module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL