godiacritics

package module
v2.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2023 License: MIT Imports: 5 Imported by: 6

README

Build Status Github Tag

Coverage Status Maintainability

Go Report Card GoDoc License


go-diacritics

A package to handle diacritics

Provides a method to remove diacritical characters from any string and replace them with their ASCII representation.

It handles all cases where an unicode decomposition exists (e.g. ä and è) as well as all known latin cases without an unicode decomposition as listed below.

Usage

To get the lastest tagged version of package, execute:

go get gopkg.in/Regis24GmbH/go-diacritics.v2

To import this package, add the following line to your code:

import "gopkg.in/Regis24GmbH/go-diacritics.v2"

This is a code example:

func main() {
  noDiacrits := godiacritics.Normalize("än éᶍample")
  println(noDiacrits) // prints "an example"
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Normalize

func Normalize(input string) string

Normalize removes diacritical characters and replaces them with their ASCII representation

Types

This section is empty.

Jump to

Keyboard shortcuts

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