sense

package
v1.19.22 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: MIT Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultDesenser = NewDefaultDesenser()
	ShortDesenser   = NewShortDesenser()
)

Functions

func DeSense

func DeSense(value string) string

Types

type Desenser

type Desenser interface {
	DeSense(value string) string
}

type StdDesenser

type StdDesenser struct {
	// 保留前缀字符的长度
	MaintainPrefixCharLength int
	// 保留后缀字符的长度
	MaintainSubfixCharLength int
}

脱敏器

func NewDefaultDesenser added in v1.9.19

func NewDefaultDesenser() *StdDesenser

func NewShortDesenser added in v1.9.19

func NewShortDesenser() *StdDesenser

func NewStdDesenser

func NewStdDesenser(prefix, subfix int) *StdDesenser

func (*StdDesenser) DeSense

func (d *StdDesenser) DeSense(value string) string

func (*StdDesenser) MaintainPrefixString added in v1.9.18

func (d *StdDesenser) MaintainPrefixString(value string) string

func (*StdDesenser) MaintainSubfixString added in v1.9.18

func (d *StdDesenser) MaintainSubfixString(value string) string

func (*StdDesenser) SenseCharNumber added in v1.9.18

func (d *StdDesenser) SenseCharNumber(value string) int

func (*StdDesenser) TotalMaintainCharLen added in v1.9.18

func (d *StdDesenser) TotalMaintainCharLen() int

Jump to

Keyboard shortcuts

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