stringutils

package
v0.0.0-...-0c1943d Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultMaskLength = 10

DefaultMaskLength is the mask length of masked string

Variables

This section is empty.

Functions

func MaskString

func MaskString(str string, visibleLength int, maskCharacter string, maskRight bool) string

MaskString takes string as argument and keep a visibleLength number of charators and mask maskCharacter is used to generate the masked part of the string It can mask the charators from either left or right hand side of the string depending on maskRight boolean It returns the masked string

func MaskToken

func MaskToken(token string) string

MaskToken masks the token with "*" character and keeps last four charaters visible

func StringInSlice

func StringInSlice(a string, list []string) bool

StringInSlice checks whether a given string is included in the slice

Types

This section is empty.

Jump to

Keyboard shortcuts

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