# Functions
Clone returns a copy of b[:len(b)].
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.
ContainsFunc reports whether any of the UTF-8-encoded code points r within b satisfy f(r).
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.
Cut slices s around the first instance of sep, returning the text before and after sep.
CutPrefix returns s without the provided leading prefix byte slice and reports whether it found the prefix.
CutSuffix returns s without the provided ending suffix byte slice and reports whether it found the suffix.
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 simple 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.
FieldsFuncSeq returns an iterator over subslices of s split around runs of Unicode code points satisfying f(c).
FieldsSeq returns an iterator over subslices of s split around runs of whitespace characters, as defined by [unicode.IsSpace].
HasPrefix reports whether the byte slice s begins with prefix.
HasSuffix reports 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.
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.
Lines returns an iterator over the newline-terminated lines in the byte slice s.
Map returns a copy of the byte slice s with all its characters modified according to the mapping function.
NewBuffer creates and initializes a new [Buffer] using buf as its initial contents.
NewBufferString creates and initializes a new [Buffer] using string s as its initial contents.
NewReader returns a new [Reader] reading from b.
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.
SplitAfterSeq returns an iterator over subslices of s split after each instance of sep.
SplitN slices s into subslices separated by sep and returns a slice of the subslices between those separators.
SplitSeq returns an iterator over all subslices of s separated by sep.
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.
# Constants
MinRead is the minimum slice size passed to a [Buffer.Read] call by [Buffer.ReadFrom].
# Variables
ErrTooLarge is passed to panic if memory cannot be allocated to store data in a buffer.