stringutil

package
v0.0.0-...-4e386bd Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LowerAlphaCharset is a charset of lower case letters.
	LowerAlphaCharset = "abcedefghijklmnopqrstuvwxyz"
	// UpperAlphaCharset is a charset of upper case letters.
	UpperAlphaCharset = "ABCDEFGHIGJKLMNOPQRSTUVWXYZ"
	// NumberCharset is a charset of numbers.
	NumberCharset = "0123456789"
	// DefaultChartSet is charset of lower case letters, upper case letters,
	// and numbers.
	DefaultChartSet = LowerAlphaCharset + UpperAlphaCharset + NumberCharset
)

Variables

This section is empty.

Functions

func Random

func Random(length int) string

Random generates a random string with length using the default charset.

func RandomWithCharset

func RandomWithCharset(length int, charset string) string

RandomWithCharset generates a random string with length given a charset.

Types

This section is empty.

Jump to

Keyboard shortcuts

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