textencoding

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(s []byte, from string) ([]byte, error)

Decode decodes the bytes to UTF-8 bytes

func Encode

func Encode(s []byte, to string) ([]byte, error)

Encode encodes the utf-8 bytes into target encoding

func IsEncodingSupported

func IsEncodingSupported(name string) bool

IsEncodingSupported checks if the encoding is supported

func Transform

func Transform(s []byte, from, to string) ([]byte, error)

Transform decodes the input bytes with srouce encoding and then encodes them into target encoding

func TransformString

func TransformString(s string, from, to string) (string, error)

TransformString decodes the input string with srouce encoding and then encodes it into target encoding

Types

This section is empty.

Jump to

Keyboard shortcuts

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