Categorygithub.com/thanhpk/ascii
modulepackage
0.0.7
Repository: https://github.com/thanhpk/ascii.git
Documentation: pkg.go.dev

# README

ascii

GoDoc

Converts an unicode string to an ascii string

Install

  go get -u github.com/thanhpk/ascii

Usage

out := ascii.Convert("Trời hôm nay đẹp quá") // Troi hom nay dep qua

Running example

  package main
  import(
    "github.com/thanhpk/ascii"
    "fmt"
  )

  func main() {
    fmt.Println(ascii.Convert("Nam quốc sơn hà mam đế cư"))
    fmt.Println(ascii.Convert("Cuántos años tienes"))
    fmt.Println(ascii.Convert("AppleInc 是苹果公司."))
  }
  // Output:
  // Nam quoc son ha mam de cu
  // Cuantos anos tienes
  // AppleInc .

License License: MIT

MIT

# Functions

Convert replaces all non-ascii characters to equivalent ascii characters e.g: â => a, đ => d, ..

# Variables

No description provided by the author