str

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GlobalTransliterations = map[rune]string{
	'‘': "'", '’': "'",
}
View Source
var Transliterations = map[rune]string{
	'À': "A", 'Â': "A", 'Å': "A", 'Ã': "A", 'Ä': "A", 'Á': "A", 'Ç': "C",
	'Č': "C", 'Ë': "E", 'É': "E", 'È': "E", 'Í': "I", 'Ì': "I", 'Ï': "I",
	'Ň': "N", 'Ñ': "N", 'Ó': "O", 'Ò': "O", 'Ô': "O", 'Õ': "O", 'Ú': "U",
	'Ù': "U", 'Ü': "U", 'Ŕ': "R", 'Ř': "R", 'Ŗ': "R", 'Š': "S", 'Ş': "S",
	'Ž': "Z", 'à': "a", 'â': "a", 'å': "a", 'ã': "a", 'ä': "a", 'á': "a",
	'ç': "c", 'č': "c", 'ë': "e", 'é': "e", 'è': "e", 'í': "i", 'ì': "i",
	'ï': "i", 'ň': "n", 'ñ': "n", 'ó': "o", 'ò': "o", 'ô': "o", 'õ': "o",
	'ú': "u", 'ù': "u", 'ü': "u", 'ŕ': "r", 'ř': "r", 'ŗ': "r", 'ſ': "s",
	'š': "s", 'ş': "s", 'ž': "z",
	'Æ': "Ae", 'Ð': "D", 'Ł': "L", 'Ø': "Oe", 'Ö': "Oe", 'Þ': "Th",
	'ß': "ss", 'æ': "ae", 'ð': "d", 'ł': "l", 'ø': "oe", 'ö': "oe",
	'þ': "th", 'Œ': "Oe", 'œ': "oe", '\'': "", '‘': "", '’': "",
}

Functions

func FixAllCaps

func FixAllCaps(s string) string

func IsBoldSurrogate

func IsBoldSurrogate(s string) bool

func JoinStrings

func JoinStrings(s1 string, s2 string, sep string) string

JoinStrings contatenates two strings with a separator. If either of the strings is empty, then the value of another string is returned instead of concatenation.

func NumToStr

func NumToStr(num string) string

func ToASCII

func ToASCII(b []byte, m map[rune]string) ([]byte, error)

ToASCII converts a UTF-8 diacritics to corresponding ASCII chars.

Types

This section is empty.

Jump to

Keyboard shortcuts

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