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

# Functions

Compare returns an integer comparing two byte slices lexicographically.
Contains reports whether subslice is within b.
ContainsAny reports whether any of the UTF-8-encoded code points in chars are within b.
ContainsByte reports whether the byte is contained in the slice b.
ContainsRune reports whether the rune is contained in the UTF-8-encoded byte slice b.
Count counts the number of non-overlapping instances of sep in s.
CountByte counts the number of b in a.
EndsWith Tests if the byte slice bs ends with the specified suffix b.
EndsWithByte Tests if the byte slice bs ends with the specified suffix b.
Equal reports whether a and b are the same length and contain the same bytes.
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 interprets s as a sequence of UTF-8-encoded code points.
FieldsFunc interprets s as a sequence of UTF-8-encoded code points.
HasPrefix tests whether the byte slice s begins with prefix.
HasSuffix tests whether the byte slice s ends with suffix.
Index returns the index of the first instance of sep in s, or -1 if sep is not present in s.
IndexAny interprets s as a sequence of UTF-8-encoded Unicode code points.
IndexByte returns the index of the first instance of c in b, or -1 if c is not present in b.
IndexFunc interprets s as a sequence of UTF-8-encoded code points.
IndexRune interprets s as a sequence of UTF-8-encoded code points.
IsEmpty checks if the byte slice is null.
Join concatenates the elements of s to create a new byte slice.
LastIndex returns the index of the last instance of sep in s, or -1 if sep is not present in s.
LastIndexAny interprets s as a sequence of UTF-8-encoded Unicode code points.
LastIndexByte returns the index of the last instance of c in s, or -1 if c is not present in s.
LastIndexFunc interprets s as a sequence of UTF-8-encoded code points.
Map returns a copy of the byte slice s with all its characters modified according to the mapping function.
Repeat returns a new byte slice consisting of count copies of b.
Replace returns a copy of the slice s with the first n non-overlapping instances of old replaced by new.
ReplaceAll returns a copy of the slice s with all non-overlapping instances of old replaced by new.
Runes interprets s as a sequence of UTF-8-encoded code points.
Split slices s into all subslices separated by sep and returns a slice of the subslices between those separators.
SplitAfter slices s into all subslices after each instance of sep and returns a slice of those subslices.
SplitAfterN slices s into subslices after each instance of sep and returns a slice of those subslices.
SplitN slices s into subslices separated by sep and returns a slice of the subslices between those separators.
StartsWith Tests if the byte slice s starts with the specified prefix b.
StartsWithByte Tests if the byte slice s starts with the specified prefix b.
Title treats s as UTF-8-encoded bytes and returns a copy with all Unicode letters that begin words mapped to their title case.
ToLower returns a copy of the byte slice s with all Unicode letters mapped to their lower case.
ToLowerSpecial treats s as UTF-8-encoded bytes and returns a copy with all the Unicode letters mapped to their lower case, giving priority to the special casing rules.
ToTitle treats s as UTF-8-encoded bytes and returns a copy with all the Unicode letters mapped to their title case.
ToTitleSpecial treats s as UTF-8-encoded bytes and returns a copy with all the Unicode letters mapped to their title case, giving priority to the special casing rules.
ToUpper returns a copy of the byte slice s with all Unicode letters mapped to their upper case.
ToUpperSpecial treats s as UTF-8-encoded bytes and returns a copy with all the Unicode letters mapped to their upper case, giving priority to the special casing rules.
ToValidUTF8 treats s as UTF-8-encoded bytes and returns a copy with each run of bytes representing invalid UTF-8 replaced with the bytes in replacement, which may be empty.
Trim returns a subslice of s by slicing off all leading and trailing UTF-8-encoded code points contained in cutset.
TrimFunc returns a subslice of s by slicing off all leading and trailing UTF-8-encoded code points c that satisfy f(c).
TrimLeft returns a subslice of s by slicing off all leading UTF-8-encoded code points contained in cutset.
TrimLeftFunc treats s as UTF-8-encoded bytes and returns a subslice of s by slicing off all leading UTF-8-encoded code points c that satisfy f(c).
TrimPrefix returns s without the provided leading prefix string.
TrimRight returns a subslice of s by slicing off all trailing UTF-8-encoded code points that are contained in cutset.
TrimRightFunc returns a subslice of s by slicing off all trailing UTF-8-encoded code points c that satisfy f(c).
TrimSpace returns a subslice of s by slicing off all leading and trailing white space, as defined by Unicode.
TrimSuffix returns s without the provided trailing suffix string.