strings.Chomp
Returns the given string, removing all trailing newline characters and carriage returns.
strings.Contains
Reports whether the given string contains the given substring.
strings.ContainsAny
Reports whether the given string contains any character within the given set.
strings.ContainsNonSpace
Reports whether the given string contains any non-space characters as defined by Unicode.
strings.Count
Returns the number of non-overlapping instances of the given substring within the given string.
strings.CountRunes
Returns the number of runes in the given string excluding whitespace.
strings.CountWords
Returns the number of words in the given string.
strings.Diff
Returns an anchored diff of the two texts OLD and NEW in the unified diff format. If OLD and NEW are identical, returns an empty string.
strings.FindRE
Returns a slice of strings that match the regular expression.
strings.FindRESubmatch
Returns a slice of all successive matches of the regular expression. Each element is a slice of strings holding the text of the leftmost match of the regular expression and the matches, if any, of its subexpressions.
strings.FirstUpper
Returns the given string, capitalizing the first character.
strings.HasPrefix
Reports whether the given string begins with the given prefix.
strings.HasSuffix
Reports whether the given string ends with the given suffix.
strings.Repeat
Returns a new string consisting of zero or more copies of another string.
strings.Replace
Returns a copy of INPUT, replacing all occurrences of OLD with NEW.
strings.ReplaceRE
Returns a copy of INPUT, replacing all occurrences of a regular expression with a replacement pattern.
strings.RuneCount
Returns the number of runes in the given string.
strings.SliceString
Returns a substring of the given string, beginning with the start position and ending before the end position.
strings.Split
Returns a slice of strings by splitting the given string by a delimiter.
strings.Substr
Returns a substring of the given string, beginning with the start position and ending after the given length.
strings.Title
Returns the given string, converting it to title case.
strings.ToLower
Returns the given string, converting all characters to lowercase.
strings.ToUpper
Returns the given string, converting all characters to uppercase.
strings.Trim
Returns the given string, removing leading and trailing characters specified in the cutset.
strings.TrimLeft
Returns the given string, removing leading characters specified in the cutset.
strings.TrimPrefix
Returns the given string, removing the prefix from the beginning of the string.
strings.TrimRight
Returns the given string, removing trailing characters specified in the cutset.
strings.TrimSpace
Returns the given string, removing leading and trailing whitespace as defined by Unicode.
strings.TrimSuffix
Returns the given string, removing the suffix from the end of the string.
strings.Truncate
Returns the given string, truncating it to a maximum length without cutting words or leaving unclosed HTML tags.