text

package
v0.0.32 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: MPL-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanString

func CleanString(origStr string, args ...bool) string

CleanString 处理字符串, args[0]为是否转换为小写

func OnlyAlphaNumeric

func OnlyAlphaNumeric(s string) string

OnlyAlphaNumeric 去除字符数字以外的所有字符

func OnlyChinese

func OnlyChinese(s string) string

OnlyChinese 去除中文以外的所有字符

func OnlyNumeric

func OnlyNumeric(s string) string

OnlyNumeric 去除数字以外的所有字符

func Truncate added in v0.0.21

func Truncate(s string, size int) string

Types

type Utils

type Utils interface {
	OnlyNumeric(s string) string
	OnlyAlphaNumeric(s string) string
	OnlyChinese(s string) string
	CleanString(origStr string, args ...bool) string
	Truncate(s string, size int) string
}

Jump to

Keyboard shortcuts

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