Documentation ¶
Index ¶
- func AppendToCommaSeparatedString(commaSeparated string, s string) string
- func AreSlicesEqualWithoutOrder(slice1 []string, slice2 []string) bool
- func CommaSeparatedStringContains(commaSeparated string, s string) bool
- func RemoveFromCommaSeparatedString(commaSeparated string, s string) string
- func RemoveStringFromSlice(slice []string, s string) []string
- func SliceAddString(slice []string, s string) ([]string, bool)
- func SliceContainsString(slice []string, s string) bool
- func SliceToSet(list []string) map[string]bool
- func UnorderedEqual(mapBool map[string]bool, arrayStr []string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendToCommaSeparatedString ¶
AppendToCommaSeparatedString appends a string to a comma separated list. It first checks that the entry is not already part of the comma separated list. commaSeparated is the comma separated string to append into. May be empty. s is the string to add. Returns the updated comma separated string
func AreSlicesEqualWithoutOrder ¶
compareSlices compares 2 string slices after sorting
func CommaSeparatedStringContains ¶
CommaSeparatedStringContains checks for a string in a comma separated list of strings commaSeparated is the comma separated string to search. May be nil. s is the string to search for. Returns true if the string is found and false otherwise.
func RemoveFromCommaSeparatedString ¶
RemoveFromCommaSeparatedString removes a string from a comma separated list. It first checks that the entry is not already part of the comma separated list. commaSeparated is the comma separated list to remove from. May be empty. s is the string to remove. Returns the updated comma separated string
func RemoveStringFromSlice ¶
RemoveStringFromSlice removes a string from a string slice. slice is the string slice to remove the string from. May be nil. s is the string to remove from the slice. Returns a new slice with the remove string removed.
func SliceAddString ¶
SliceAddString Adds a string to a slice if it is not already present
func SliceContainsString ¶
SliceContainsString checks for a string in a slice of strings slice is the string slice to search. May be nil. s is the string to search for in the slice. Returns true if the string is found in the slice and false otherwise.
func SliceToSet ¶
SliceToSet converts a slice of strings to a set of strings
Types ¶
This section is empty.