package
1.0.26
Repository: https://github.com/askasoft/pango.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# Functions

CamelCase returns a copy of the string s with camel case.
Capitalize returns a copy of the string s that the start letter mapped to their Unicode upper case.
ChecksFunc return false if s ==” or any rune with f(r) is false.
Clone returns a fresh copy of s.
Compare returns an integer comparing two strings lexicographically.
CompareFold returns an integer comparing two strings case-insensitive.
Contains reports whether substr is within s.
ContainsAny reports whether any Unicode code points in chars are within s.
ContainsByte reports whether b is within s.
ContainsFold reports whether substr is within s (case insensitive).
ContainsFunc reports whether any Unicode code points r within s satisfy f(r).
ContainsRune reports whether the Unicode code point r is within s.
Count counts the number of non-overlapping instances of substr in s.
CountAny counts the number of any character of chars in s.
CountByte counts the number of b in s.
CountFunc counts the number of character that satisfing f(c) in s.
CountRune counts the number of c in s.
Cut slices s around the first instance of sep, returning the text before and after sep.
CutAny slices s around the first instance of any Unicode code point from chars in s, returning the text before and after separator.
CutAt slices s around the rune position p, returning the text before and start position p.
CutByte slices s around the first instance of sep, returning the text before and after sep.
CutFunc slices s around the first instance of the Unicode code point satisfying f(c), returning the text before and after f(c).
CutPrefix returns s without the provided leading prefix string and reports whether it found the prefix.
CutRune slices s around the first instance of sep, returning the text before and after sep.
CutSuffix returns s without the provided ending suffix string and reports whether it found the suffix.
EndsWith Tests if the string s ends with the specified suffix.
EndsWithByte Tests if the byte slice bs ends with the specified suffix b.
EndsWithFold Tests if the string s ends with the specified suffix (case insensitive).
EqualFold reports whether s and t, interpreted as UTF-8 strings, are equal under Unicode case-folding, which is a more general form of case-insensitivity.
Fields splits the string s around each instance of one or more consecutive white space characters, as defined by unicode.IsSpace, returning a slice of substrings of s or an empty slice if s contains only white space.
FieldsAny split string (exclude empty string) into string slice by any rune in chars.
FieldsByte split string (exclude empty string) into string slice by byte c.
FieldsFunc splits the string s at each rune of Unicode code points c satisfying f(c) and returns an array of slices of s.
FieldsFuncIter splits the string s at each rune of Unicode code points c satisfying f(c) and call iter(s).
FieldsRune split string (exclude empty string) into string slice by rune r.
HasLowerCase checks if the string contains at least 1 lowercase.
HasMultibyte checks if the string contains one or more multibyte chars.
HasPrefix tests whether the string s begins with prefix.
HasPrefixFold Tests if the string s starts with the specified prefix (case insensitive).
HasSuffix tests whether the string s ends with suffix.
HasSuffixFold Tests if the string s ends with the specified suffix (case insensitive).
HasUpperCase checks if the string contains as least 1 uppercase.
HasWhitespace checks if the string contains any whitespace.
If return (b ? t : f).
IfEmpty return (a == "" ? b : a).
Index returns the index of the first instance of substr in s, or -1 if substr is not present in s.
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.
IndexByte returns the index of the first instance of c in s, or -1 if c is not present in s.
IndexFold returns the index of the first instance of substr in s (case insensitive), or -1 if substr is not present in s.
IndexFunc returns the index into s of the first Unicode code point satisfying f(c), or -1 if none do.
IndexRune returns the index of the first instance of the Unicode code point r, or -1 if rune is not present in s.
IsASCII checks if the string contains ASCII chars only.
IsASCIIPrintable checks if the string contains printable ASCII chars only.
IsDecimal checks if the string is a decimal number "^[-+]?[0-9]+(?:\\.[0-9]+)?$".
IsEmpty checks if the string is null.
IsHexadecimal checks if the string is a hexadecimal number `^(0[xX])?[0-9a-fA-F]+$`.
IsLetter checks if the string contains only letters (a-zA-Z).
IsLetterNumber checks if the string contains only letters and numbers.
IsLowerCase checks if the string is lowercase.
IsNotEmpty checks if the string is not null.
IsNumber checks if the string contains only numbers.
IsNumeric checks if the string contains only numbers and prefix [+-].
IsUpperCase checks if the string is uppercase.
IsUTFDigit checks if the string contains only unicode radix-10 decimal digits.
IsUTFLetter checks if the string contains only unicode letter characters.
IsUTFLetterNumber checks if the string contains only unicode letter or number characters.
IsUTFNumber checks if the string contains only unicode number characters.
IsUTFNumeric checks if the string contains only unicode numbers of any kind.
IsUTFPrintable checks if the string contains printable chars only.
IsWhitespace checks the string only contains whitespace.
Join concatenates the elements of its first argument to create a single string.
JoinInt64s concatenates the elements of its first argument to create a single string.
JoinInts concatenates the elements of its first argument to create a single string.
LastCut slices s around the last instance of sep, returning the text before and after sep.
LastCutAny slices s around the last instance of any Unicode code point from chars in s, returning the text before and after separator.
LastCutByte slices s around the last instance of sep, returning the text before and after sep.
LastCutFunc slices s around the last instance of the Unicode code point satisfying f(c), returning the text before and after f(c).
LastCutRune slices s around the last instance of sep, returning the text before and after sep.
LastIndex returns the index of the last instance of substr in s, or -1 if substr is not present in s.
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.
LastIndexByte returns the index of the last instance of c in s, or -1 if c is not present in s.
LastIndexFold returns the index of the last instance of substr in s (case insensitive), or -1 if substr is not present in s.
LastIndexFunc returns the index into s of the last Unicode code point satisfying f(c), or -1 if none do.
LastIndexRune returns the index of the last instance of the Unicode code point r, or -1 if rune is not present in s.
Left return the leftmost n rune string.
Map returns a copy of the string s with all its characters modified according to the mapping function.
Mid slices s around the rune position p, returning the max n rune string start from the position p.
NewReader returns a new Reader reading from s.
NewReplacer returns a new Replacer from a list of old, new string pairs.
PadCenter Center pad a string with the string p to a new string with RuneCount(s) = size.
PadCenterByte Center pad a string with the byte b to a new string with len(s) = size.
PadCenterRune Center pad a string with the rune r to a new string with RuneCount(s) = size.
PadLeft left pad the string s with the string p to a new string with RuneCount(s) = size.
PadLeftByte left pad the string s with the byte b to a new string with len(s) = size.
PadLeftRune left pad the string s with the rune r to a new string with RuneCount(s) = size.
PadRight right pad the string s with the string p to a new string with RuneCount(s) = size.
PadRightByte right pad the string s with the byte b to a new string with len(s) = size.
PadRightRune right pad the string s with the rune r to a new string with RuneCount(s) = size.
PascalCase returns a copy of the string s with pascal case.
RandLetterNumbers create a random letter number string.
RandLetters create a random letter string.
RandLowerLetters create a random lower letter string.
RandNumbers create a random number string.
RandString create a random string by the input chars if chars is omitted, the LetterNumberSymbols is used.
RandSymbols create a random letter string.
RandUpperLetters create a random upper letter string.
Remove Removes all substring r from within the source string s.
RemoveAny Removes all occurrences of characters from within the source string s.
RemoveByte Removes all occurrences of the byte b from the source string s.
RemoveEmpties remove empty string in the string array 'ss', and returns the string array 'ss'.
RemoveFunc Removes all occurrences of characters from within the source string which satisfy f(c).
RemoveRune Removes all occurrences of the rune r from the source string s.
Removes remove string 'v' in the string array 'ss', and returns the string array 'ss'.
Repeat returns a new string consisting of count copies of the string s.
RepeatByte returns a new string consisting of count copies of the byte b.
RepeatRune returns a new string consisting of count copies of the rune r.
Replace returns a copy of the string s with the first n non-overlapping instances of old replaced by new.
ReplaceAll returns a copy of the string s with all non-overlapping instances of old replaced by new.
ReplaceFunc replace all runes with function `f`.
Right return the rightmost n rune string.
RuneCount returns the number of runes in s.
RuneEqualFold reports whether sr and tr, are equal under Unicode case-folding, which is a more general form of case-insensitivity.
RuneLen returns the number of runes in s.
SkipBOM Returns a string without BOM.
SnakeCase returns a copy of the string s with snake case.
SnakeCaseWithRune returns a copy of the string s with snake case rune d.
Split slices s into all substrings separated by sep and returns a slice of the substrings between those separators.
SplitAfter slices s into all substrings after each instance of sep and returns a slice of those substrings.
SplitAfterN slices s into substrings after each instance of sep and returns a slice of those substrings.
SplitAny split string into string slice by any rune in chars.
SplitCount splits the string s by the length 'n' to a string slice.
SplitFunc splits the string s at each rune of Unicode code points c satisfying f(c) and returns an array of slices of s.
SplitLength splits the string s by the length 'n' to a string slice.
SplitN slices s into substrings separated by sep and returns a slice of the substrings between those separators.
StartsWith Tests if the string s starts with the specified prefix.
StartsWithByte Tests if the byte slice s starts with the specified prefix b.
StartsWithFold Tests if the string s starts with the specified prefix (case insensitive).
Strip returns a slice of the string s, with all leading and trailing white space removed, as defined by Unicode.
StripLeft returns a slice of the string s, with all leading white space removed, as defined by Unicode.
StripLefts left strip all string in the string array ss.
StripRight returns a slice of the string s, with all trailing white space removed, as defined by Unicode.
StripRights right strip all string in the string array ss.
Strips strip all string in the string array ss.
SubstrAfter Gets the substring after the first occurrence of a separator b.
SubstrAfterAny Gets the substring after the first occurrence of any char in separator b.
SubstrAfterByte Gets the substring after the first occurrence of a separator b.
SubstrAfterLast Gets the substring after the last occurrence of a separator b.
SubstrAfterLastAny Gets the substring after the last occurrence of any char in separator b.
SubstrAfterLastByte Gets the substring after the last occurrence of a separator b.
SubstrAfterLastRune Gets the substring after the last occurrence of a separator r.
SubstrAfterRune Gets the substring after the first occurrence of a separator r.
SubstrBefore Gets the substring before the first occurrence of a separator b.
SubstrBeforeAny Gets the substring before the first occurrence of any chat in separator b.
SubstrBeforeByte Gets the substring before the first occurrence of a separator b.
SubstrBeforeLast Gets the substring before the last occurrence of a separator b.
SubstrBeforeLastAny Gets the substring before the last occurrence of any char in separator b.
SubstrBeforeLastByte Gets the substring before the last occurrence of a separator b.
SubstrBeforeLastRune Gets the substring before the last occurrence of a separator r.
SubstrBeforeRune Gets the substring before the first occurrence of a separator r.
ToLower returns s with all Unicode letters mapped to their lower case.
ToLowers lowercase all string in the string array ss.
ToLowerSpecial returns a copy of the string s with all Unicode letters mapped to their lower case using the case mapping specified by c.
ToTitle returns a copy of the string s with all Unicode letters mapped to their Unicode title case.
ToTitleSpecial returns a copy of the string s with all Unicode letters mapped to their Unicode title case, giving priority to the special casing rules.
ToUpper returns s with all Unicode letters mapped to their upper case.
ToUppers uppercase all string in the string array ss.
ToUpperSpecial returns a copy of the string s with all Unicode letters mapped to their upper case using the case mapping specified by c.
ToValidUTF8 returns a copy of the string s with each run of invalid UTF-8 byte sequences replaced by the replacement string, which may be empty.
ToValidUTF8s returns a copy of the string s with each run of invalid UTF-8 byte sequences replaced by the replacement string, which may be empty.
Trim returns a slice of the string s with all leading and trailing Unicode code points contained in cutset removed.
TrimAny returns a slice of the string s, with all leading and trailing cutset removed.
TrimFunc returns a slice of the string s with all leading and trailing Unicode code points c satisfying f(c) removed.
TrimLeft returns a slice of the string s with all leading Unicode code points contained in cutset removed.
TrimLeftFunc returns a slice of the string s with all leading Unicode code points c satisfying f(c) removed.
TrimPrefix returns s without the provided leading prefix string.
TrimRight returns a slice of the string s, with all trailing Unicode code points contained in cutset removed.
TrimRightFunc returns a slice of the string s with all trailing Unicode code points c satisfying f(c) removed.
TrimSpace returns a slice of the string s, with all leading and trailing white space removed, as defined by Unicode.
TrimSpaces trim every string in the string array.
TrimSuffix returns s without the provided trailing suffix string.
UnsafeBytes returns a []byte from string with no memory allocations.
UnsafeString returns a string from []byte with no memory allocations.

# Constants

Base64 a-zA-Z0-9+/.
Base64URL a-zA-Z0-9-_.
BOM "\uFEFF".
LetterDigitSymbols A String for letters, numbers and symbols.
LetterNumbers A String for letters and numbers.
Letters A String for letters "a-zA-Z".
LowerLetters A String for lower letters "a-z".
Numbers A String for numbers "0123456789".
SymbolNumbers A String for symbols and numbers "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~0123456789".
Symbols A String for symbols "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~".
Letters A String for upper letters "A-Z".

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author