Documentation
¶
Index ¶
- func AllControl(s string) bool
- func AllDigit(s string) bool
- func AllGraphic(s string) bool
- func AllLetter(s string) bool
- func AllLetterOrDigit(s string) bool
- func AllLower(s string) bool
- func AllMark(s string) bool
- func AllPrint(s string) bool
- func AllPunct(s string) bool
- func AllSpace(s string) bool
- func AllSymbol(s string) bool
- func AllTitle(s string) bool
- func AllUpper(s string) bool
- func Camel2Snake(s string) string
- func ContainsAny(s, chars string) bool
- func ContainsRune(s string, r rune) bool
- func Count(s, substr string) int
- func EqualFold(s, t string) bool
- func Fields(s string) []string
- func FieldsFunc(s string, f func(rune) bool) []string
- func HasControl(s string) bool
- func HasDigit(s string) bool
- func HasGraphic(s string) bool
- func HasLetter(s string) bool
- func HasLetterOrDigit(s string) bool
- func HasLower(s string) bool
- func HasMark(s string) bool
- func HasPrefix(s, prefix string) bool
- func HasPrint(s string) bool
- func HasPunct(s string) bool
- func HasSpace(s string) bool
- func HasSuffix(s, suffix string) bool
- func HasSymbol(s string) bool
- func HasTitle(s string) bool
- func HasUpper(s string) bool
- func Index(s, substr string) int
- func IndexAny(s, chars string) int
- func IsDigit[M string | []rune](r M) bool
- func IsUpper[M string | []rune](r M) bool
- func LastIndex(s, substr string) int
- func LastIndexAny(s, chars string) int
- func Quote(s string) string
- func QuotePure(s string) string
- func RandLetterNumbers(n int) string
- func RandLetters(n int) string
- func RandLowerLetterNumbers(n int) string
- func RandLowerLetters(n int) string
- func RandNumbers(n int) string
- func RandStringWithSeed(n int, seed []rune) string
- func RandUpperLetterNumbers(n int) string
- func RandUpperLetters(n int) string
- func Repeat(s string, count int) string
- func Replace(s, old, new string, n int) string
- func ReplaceAll(s, old, new string) string
- func Reverse(s string) string
- func Shorten(s string, max int) string
- func ShortenShow(s string, max int) string
- func Snake2Camel(s string) string
- func Snake2SmallCamel(s string) string
- func Split(s, sep string) []string
- func SplitAfter(s, sep string) []string
- func SplitAfterN(s, sep string, n int) []string
- func SplitLen(s string, max int) []string
- func SplitN(s, sep string, n int) []string
- func Title(s string) string
- func ToBytes(s string) []byte
- func ToCamel(s string) string
- func ToDot(s string) string
- func ToKebab(s string) string
- func ToLower(s string) string
- func ToSlash(s string) string
- func ToSmallCamel(s string) string
- func ToSnake(s string) string
- func ToString(b []byte) string
- func ToTitle(s string) string
- func ToUpper(s string) string
- func Trim(s, cutset string) string
- func TrimLeft(s, cutset string) string
- func TrimPrefix(s, prefix string) string
- func TrimRight(s, cutset string) string
- func TrimSpace(s string) string
- func TrimSuffix(s, suffix string) string
- func Utf16Len[M string | []rune | []byte](str M) int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllControl ¶
func AllGraphic ¶
func AllLetterOrDigit ¶
func ContainsAny ¶
ContainsAny reports whether any of the UTF-8-encoded code points in chars are within s.
func ContainsRune ¶
ContainsRune reports whether the Unicode code point r is within s.
func Fields ¶
Fields splits the string s around each instance of one or more consecutive white space characters.
func FieldsFunc ¶
FieldsFunc splits the string s at each run of Unicode code points c satisfying f(c).
func HasControl ¶
func HasGraphic ¶
func HasLetterOrDigit ¶
func Index ¶
Index returns the index of the first instance of substr in s, or -1 if substr is not present in s.
func IndexAny ¶
IndexAny returns the index of the first instance of any Unicode code point from chars in s, or -1 if no Unicode code point from chars is present in s.
func LastIndex ¶
LastIndex returns the index of the last instance of substr in s, or -1 if substr is not present in s.
func LastIndexAny ¶
LastIndexAny returns the index of the last instance of any Unicode code point from chars in s, or -1 if no Unicode code point from chars is present in s.
func RandLetterNumbers ¶
func RandLetters ¶
func RandLowerLetterNumbers ¶
func RandLowerLetters ¶
func RandNumbers ¶
func RandStringWithSeed ¶
func RandUpperLetterNumbers ¶
func RandUpperLetters ¶
func Replace ¶
Replace returns a copy of the string s with the first n non-overlapping instances of old replaced by new.
func ReplaceAll ¶
ReplaceAll returns a copy of the string s with all non-overlapping instances of old replaced by new.
func ShortenShow ¶
func Split ¶
Split slices s into all substrings separated by sep and returns a slice of the substrings between those separators.
func SplitAfter ¶
SplitAfter slices s into all substrings after each instance of sep and returns a slice of those substrings.
func SplitAfterN ¶
SplitAfterN slices s into substrings after each instance of sep and returns a slice of those substrings.
func SplitN ¶
SplitN slices s into substrings separated by sep and returns a slice of the substrings between those separators.
func Title ¶
Title returns a copy of the string s with all Unicode letters that begin words mapped to their Unicode title case.
func ToTitle ¶
ToTitle returns a copy of the string s with all Unicode letters mapped to their Unicode title case.
func Trim ¶
Trim returns a slice of the string s with all leading and trailing Unicode code points contained in cutset removed.
func TrimLeft ¶
TrimLeft returns a slice of the string s with all leading Unicode code points contained in cutset removed.
func TrimPrefix ¶
TrimPrefix returns s without the provided leading prefix string.
func TrimRight ¶
TrimRight returns a slice of the string s with all trailing Unicode code points contained in cutset removed.
func TrimSpace ¶
TrimSpace returns a slice of the string s, with all leading and trailing white space removed.
func TrimSuffix ¶
TrimSuffix returns s without the provided trailing suffix string.
Types ¶
This section is empty.