langutil

package
v0.0.0-...-429e9f6 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GbkToUtf8

func GbkToUtf8(s []byte) ([]byte, error)

func GetDefaultLang

func GetDefaultLang() uint32

func LocalToUTF8

func LocalToUTF8(local string) string

func NeedTransformEncoding

func NeedTransformEncoding() bool

func SafeTruncateStringInBytes

func SafeTruncateStringInBytes(danger string, maxByteCount int) string

SafeTruncateStringInBytes safely truncates string content which is using multi-byte encoding, e.g. default encoding UTF-8, into that no more than specified byte count.

func UTF8ToLocal

func UTF8ToLocal(utf8String string) string

func Utf8ToGbk

func Utf8ToGbk(s []byte) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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