typs

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountCapitalLetters

func CountCapitalLetters(str string) int

func CountNumericCharacters

func CountNumericCharacters(str string) int

func CountSmallLetters

func CountSmallLetters(str string) int

func CountSpecialCharacters

func CountSpecialCharacters(str string) int

func GetRandomAlphaString

func GetRandomAlphaString(n int) string

GetRandomAlphaString will get a n character long random alphabetic string

func GetRandomNumericString

func GetRandomNumericString(n int) string

GetRandomNumericString will get a n character long random numeric string

func GetRandomSpecialCharacterString

func GetRandomSpecialCharacterString(n int) string

GetRandomSpecialCharacterString will get a n character long random string made of special characters

func GetRandomString

func GetRandomString(n int) string

GetRandomString will get a n character long random string that might contain alphabets, numbers and special chars

func IsAlphaNumeric

func IsAlphaNumeric(input string) bool

func IsAlphaNumericOrDotDashUnderscore

func IsAlphaNumericOrDotDashUnderscore(input string) bool

func IsPositiveNumber

func IsPositiveNumber(input string) bool

func IsValidEmail

func IsValidEmail(email string) bool

IsValidEmail checks if the supplied string is a valid email

Types

type String

type String struct {
	// contains filtered or unexported fields
}

String facilitates basic string type and functions

func NewString

func NewString(str string) *String

NewString returns a new String type

func (String) GetOriginalString

func (s String) GetOriginalString() string

GetOriginalString returns the original value with which the String wqs created

func (*String) IsNumeric

func (s *String) IsNumeric() bool

IsNumeric tells if a string is numeric or not

func (*String) Length

func (s *String) Length() int

Length returns the length of the string

func (*String) Reset

func (s *String) Reset()

Reset sets the current value of the String to its original value with which it was created

func (*String) String

func (s *String) String() string

String implements the built-in Stringer interface

func (*String) ToLowerCase

func (s *String) ToLowerCase() *String

ToLowerCase converts the string to lower case

func (*String) ToUpperCase

func (s *String) ToUpperCase() *String

ToUpperCase converts the string to lower case

func (*String) Trim

func (s *String) Trim() *String

Trim trims off spaces from both ends of the string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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