Debian Codegraph @

/

debian golang-github-gosimple-unidecode 1.0.1-2.1debian golang-github-gosimple-unidecode-dev gomod github.com/gosimple/unidecode debiangogoinimakefilemarkdownshellyaml 20 files · 82 symbols
View dependency graph

Depends on

README (full)

unidecode

Go Reference Tests

Unicode transliterator in Golang - Replaces non-ASCII characters with their ASCII approximations.

Fork of https://github.com/rainycape/unidecode

Example

package main

import (
	"fmt"

	"github.com/gosimple/unidecode"
)

func main() {
	decoded := unidecode.Unidecode("Łódź")
	fmt.Println(decoded)
	// Output: Lodz
}

Requests or bugs?

https://github.com/gosimple/unidecode/issues

Installation

go get -u github.com/gosimple/unidecode

Benchmark

go test -run=NONE -bench=. -benchmem -count=6 ./... > old.txt
# make changes
go test -run=NONE -bench=. -benchmem -count=6 ./... > new.txt

go install golang.org/x/perf/cmd/benchstat@latest

benchstat old.txt new.txt

Add new characters

  1. Edit table.txt file.

  2. Rebuild table.go file:

    go run ./make_table.go
    
dir .github/
dir debian/
file .gitignore
file LICENSE
file README.md
file decode.go
file go.mod
file make_table.go
file table.go
file table.txt
file unidecode.go
file unidecode_test.go