sense

package
v0.0.0-...-1225d9a Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: MIT Imports: 1 Imported by: 0

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

func NewDefaultDesenser() *StdDesenser

func NewShortDesenser

func NewShortDesenser() *StdDesenser

func NewStdDesenser

func NewStdDesenser(prefix, subfix int) *StdDesenser

func (*StdDesenser) DeSense

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

func (*StdDesenser) MaintainPrefixString

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

func (*StdDesenser) MaintainSubfixString

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

func (*StdDesenser) SenseCharNumber

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

func (*StdDesenser) TotalMaintainCharLen

func (d *StdDesenser) TotalMaintainCharLen() int

Jump to

Keyboard shortcuts

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