Documentation
¶
Index ¶
- func Contains(str string, substr string) bool
- func ContainsAny(str string, substr string) bool
- func Count(str string, substr string) int
- func Cut(str string, substr string) (string, string, bool)
- func HasPrefix(str string, substr string) bool
- func HasSuffix(str string, substr string) bool
- func IndexOf(str string, substr string) int
- func Join(elems []string, sep string) string
- func Replace(str string, old string, new string, nb int) string
- func ReplaceAll(str string, old string, new string) string
- func Split(str string, sep string) []string
- func SplitAfter(str string, sep string) []string
- func SplitAfterN(str string, sep string, n int) []string
- func SplitN(str string, sep string, n int) []string
- func ToLower(str string) string
- func ToUpper(str string) string
- func Trim(str string, cutset string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsAny ¶
ContainsAny returns true if the string contains any characters in the substring
func Cut ¶
Cut returns the strings before and after the substring, and a boolean indicating if the substring was found
func IndexOf ¶
IndexOf returns the index of the first instance of the substring in the string, or -1 if not found
func Replace ¶
Replace returns a copy of the string with old replaced by new and the number of replacements
func ReplaceAll ¶
ReplaceAll returns a copy of the string with old replaced by new
func SplitAfter ¶
SplitAfter returns a slice of strings split after the separator, with the separator included
func SplitAfterN ¶
SplitAfterN returns a slice of strings split after the separator, with the separator included, with a maximum of n splits
Types ¶
This section is empty.