gearstring

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CharAt

func CharAt(str string, index int) string

CharAt return a specified character from a string

func Contact

func Contact(args ...string) string

Contact Concatenate multiple strings and return a new string

func DesensitizeData

func DesensitizeData(val string, from, to uint, placeholder string) (string, error)

DesensitizeData make data insensitive via hidden part of the data, default placeholder is '*'

func DesensitizePhone

func DesensitizePhone(val string, placeholder string) (string, error)

DesensitizePhone hidden middle 4 numbers of the mobile phone, default placeholder is '*'

func Substring

func Substring(str string, start, end int) string

Substring return the part of the string from the start and excluding the end, or to the end of the string if no end index is supplied ps: not include the end index element

func ToLowerCase

func ToLowerCase(s string) string

ToLowerCase change the first letter of the string to lower

func ToUpperCase

func ToUpperCase(s string) string

ToUpperCase change the first letter of the string to upper

Types

This section is empty.

Jump to

Keyboard shortcuts

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