Documentation ¶
Overview ¶
Package strutil contains string and byte processing functions.
Index ¶
- func AppendSplitN(dst []string, s, sep string, n int) []string
- func ContainsFold(s, substr string) bool
- func HasPrefixFold(s, prefix string) bool
- func HasSuffixFold(s, suffix string) bool
- func ParseUintBytes(s []byte, base int, bitSize int) (n uint64, err error)
- func StringFromBytes(v []byte) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendSplitN ¶
AppendSplitN is like strings.SplitN but appends to and returns dst. Unlike strings.SplitN, an empty separator is not supported. The count n determines the number of substrings to return:
n > 0: at most n substrings; the last substring will be the unsplit remainder. n == 0: the result is nil (zero substrings) n < 0: all substrings
func ContainsFold ¶
ContainsFold is like strings.Contains but uses Unicode case-folding.
func HasPrefixFold ¶
HasPrefixFold is like strings.HasPrefix but uses Unicode case-folding.
func HasSuffixFold ¶
HasSuffixFold is like strings.HasPrefix but uses Unicode case-folding.
func ParseUintBytes ¶
ParseUintBytes is like strconv.ParseUint, but using a []byte.
func StringFromBytes ¶
StringFromBytes returns string(v), minimizing copies for common values of v.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.