# Functions
Clone returns a fresh copy of s.
Compare returns an integer comparing two strings lexicographically.
Contains reports whether substr is within s.
ContainsAny reports whether any Unicode code points in chars are within s.
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.
Cut slices s around the first instance of sep, returning the text before and after sep.
CutPrefix returns s without the provided leading prefix string and reports whether it found the prefix.
CutSuffix returns s without the provided ending suffix string and reports whether it found the suffix.
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 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.
FieldsFunc splits the string s at each run of Unicode code points c satisfying f(c) and returns an array of slices of s.
FieldsFuncSeq returns an iterator over substrings of s split around runs of Unicode code points satisfying f(c).
FieldsSeq returns an iterator over substrings of s split around runs of whitespace characters, as defined by [unicode.IsSpace].
HasPrefix reports whether the string s begins with prefix.
HasSuffix reports whether the string s ends with suffix.
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.
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.
Join concatenates the elements of its first argument to create a single string.
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.
LastIndexFunc returns the index into s of the last Unicode code point satisfying f(c), or -1 if none do.
Lines returns an iterator over the newline-terminated lines in the string s.
Map returns a copy of the string s with all its characters modified according to the mapping function.
NewReader returns a new [Reader] reading from s.
NewReplacer returns a new [Replacer] from a list of old, new string pairs.
Repeat returns a new string consisting of count copies of the string s.
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.
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.
SplitAfterSeq returns an iterator over substrings of s split after each instance of sep.
SplitN slices s into substrings separated by sep and returns a slice of the substrings between those separators.
SplitSeq returns an iterator over all substrings of s separated by sep.
Title returns a copy of the string s with all Unicode letters that begin words mapped to their Unicode title case.
ToLower returns s with all Unicode letters mapped to their lower case.
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.
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.
Trim returns a slice of the string s with all leading and trailing Unicode code points contained in 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.
TrimSuffix returns s without the provided trailing suffix string.
# Structs
A Builder is used to efficiently build a string using [Builder.Write] methods.
A Reader implements the [io.Reader], [io.ReaderAt], [io.ByteReader], [io.ByteScanner], [io.RuneReader], [io.RuneScanner], [io.Seeker], and [io.WriterTo] interfaces by reading from a string.
Replacer replaces a list of strings with replacements.