str

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Enter string

Functions

func ByteAppend

func ByteAppend(b ...[]byte) []byte

func HasEmpty

func HasEmpty(args ...string) bool

func HasLower

func HasLower(s string) bool

func HasUpper

func HasUpper(s string) bool

func ID

func ID() xid.ID

func IsAlpha

func IsAlpha(s string) bool

func IsAlphanumeric

func IsAlphanumeric(s string) bool

IsAlphanumeric checks if the string contains only Unicode letters or digits.

func IsLower

func IsLower(s string) bool

func IsMatch

func IsMatch(and bool, opts ...MatchOption) bool

func IsNumeric

func IsNumeric(s string) bool

IsNumeric Checks if the string contains only digits. A decimal point is not a digit and returns false.

func IsUpper

func IsUpper(s string) bool

func LastLine

func LastLine(s string) string

func LastLineByte

func LastLineByte(buf []byte) []byte

func New

func New(keyword ...string) *trie.Trie

func Replaces

func Replaces(s string, rs ...ReplacePoint) string

func Split

func Split(s string, sep string) []string

func StringAppend

func StringAppend(ss ...string) string

func ToBytes

func ToBytes(s string) []byte

func ToString

func ToString(b []byte) string

func UpperCaseToUnderScore

func UpperCaseToUnderScore(s string) string

Types

type MatchOption

type MatchOption func(m *MatchProxy)

func WithFunc

func WithFunc(f func(raw string, pattern string) bool, pattern string) MatchOption

func WithRawString

func WithRawString(s string) MatchOption

type MatchProxy

type MatchProxy struct {
	RawString string
	Func      []func(raw string, pattern string) bool
	Pattern   []string
}

type ReplacePoint

type ReplacePoint struct {
	Old string
	New string
	N   int
}

Jump to

Keyboard shortcuts

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