Skip to content

Commit

Permalink
Add example and more info to README (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
matrixik authored Jul 24, 2021
1 parent 2b91b80 commit 3795a1d
Showing 1 changed file with 43 additions and 3 deletions.
46 changes: 43 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,49 @@
unidecode
=========
# unidecode

[![Go Reference](https://pkg.go.dev/badge/github.com/gosimple/unidecode.svg)](https://pkg.go.dev/github.com/gosimple/unidecode)
[![Tests](https://github.com/gosimple/unidecode/actions/workflows/tests.yml/badge.svg)](https://github.com/gosimple/unidecode/actions/workflows/tests.yml)

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

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

## Example

```go
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

```shell
go get -u github.com/gosimple/unidecode
```

## Benchmark

```shell
go get golang.org/x/perf/cmd/...

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

benchstat old.txt new.txt
```

0 comments on commit 3795a1d

Please sign in to comment.