tools

package module
v0.0.0-...-ce749e9 Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: Apache-2.0 Imports: 6 Imported by: 6

README

tools

tools to predator

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compress

func Compress(src []byte) []byte

func Decompress

func Decompress(src []byte) ([]byte, error)

func GBKToUTF8

func GBKToUTF8(src []byte) ([]byte, error)

GBKToUTF8 converts `GBK` encoded bytes to `UTF-8` encoded bytes

func RemoveInvalidChars

func RemoveInvalidChars(src string, chars ...string) string

RemoveInvalidChars 删除单句中的无效字符,如一些无意义的特殊字符

func ReplaceInvalidSpaces

func ReplaceInvalidSpaces(src string) string

ReplaceInvalidSpaces 替换html页面中各种奇葩的空白符为空格

func Strip

func Strip(src string) string

Trim 删除两则空白字符,包插空格、换行、制表、全角空格

func Trim

func Trim(s_ string, chars_ string) string

Trim 删除目标字符串两侧的无用字符

func UTF8ToGBK

func UTF8ToGBK(src []byte) ([]byte, error)

UTF8ToGBK converts `UTF-8` encoded bytes to `GBK` encoded bytes

Types

This section is empty.

Jump to

Keyboard shortcuts

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