Documentation ¶
Index ¶
- func CompareStringArray(a, b []string) bool
- func CompareStringPointers(a, b *string) bool
- func CompareStrings(a, b string) bool
- func DiffStrings(compareWhat, compareTo []string) []string
- func DiffStringsOneWay(compareWhat, compareTo []string) []string
- func Join(elems []string, sep string) string
- func ListContains(a []string, b string) bool
- func PrefixStringArray(a []string, prefix string) []string
- func Split(s, sep string) []string
- func SplitN(s, sep string, n int) []string
- func Title(in string) string
- func ToLower(s string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareStringArray ¶
func CompareStringPointers ¶
func CompareStrings ¶
func DiffStrings ¶
DiffStrings returns the elements in `compareWhat` that are not in `compareTo` and elements in `compareTo` that are not in `compareFrom`.
func DiffStringsOneWay ¶
DiffStringsOneWay returns the elements in `compareWhat` that are not in `compareTo`.
func Join ¶
Join concatenates the elements of its first argument to create a single string. The separator string sep is placed between elements in the resulting string.
func ListContains ¶
func PrefixStringArray ¶
func Split ¶
Split slices s into all substrings separated by sep and returns a slice of the substrings between those separators.
If s does not contain sep and sep is not empty, Split returns a slice of length 1 whose only element is s.
If sep is empty, Split splits after each UTF-8 sequence. If both s and sep are empty, Split returns an empty slice.
It is equivalent to SplitN with a count of -1.
To split around the first instance of a separator, see Cut.
func SplitN ¶
SplitN slices s into substrings separated by sep and returns a slice of the substrings between those separators.
The count 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
Edge cases for s and sep (for example, empty strings) are handled as described in the documentation for Split.
To split around the first instance of a separator, see Cut.
Types ¶
This section is empty.