utf16decode

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: MIT Imports: 4 Imported by: 0

README

utf16decode

I wanted to convert UTF-32 codes to UTF-16, often encoded in some JSON. This library helps do that. It rejexes for unicde strings and then converts them to UTF-16 using the standard formula.

For example:

jsonData := `{"text":"Cool! \u2764\ufe0f\ud83d\udc7d\ud83d\ude80"}`
fmt.Println(utf16decode.Decode(jsonData))

will print

{"text":"Cool! ❤️👽🚀"}

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(s0 string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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