Skip to content

Latest commit

 

History

History
59 lines (42 loc) · 1.26 KB

README.md

File metadata and controls

59 lines (42 loc) · 1.26 KB

go-unidecode

Build Status Coverage Status Go Report Card GoDoc

ASCII transliterations of Unicode text.

Installation

go get -u github.com/tisorlawan/go-unidecode

Install CLI tool:

go get -u github.com/tisorlawan/go-unidecode/unidecode
$ unidecode 北京
Bei Jing 

Documentation

API documentation can be found here: https://godoc.org/github.com/tisorlawan/go-unidecode

Usage

package main

import (
	"fmt"
	"github.com/tisorlawan/go-unidecode"
)

func main() {
	s := "abc"
	fmt.Println(unidecode.Unidecode(s))
	// Output: abc

	s = "北京"
	fmt.Println(unidecode.Unidecode(s))
	// Output: Bei Jing

	s = "kožušček"
	fmt.Println(unidecode.Unidecode(s))
	// Output: kozuscek
}