Documentation ¶
Index ¶
- func Filter(f func(string) bool, s []string) []string
- func InSlice(needle string, list []string) bool
- func ListForHumans(s []string) string
- func Map(f func(string) string, s []string) []string
- func Normalize(s string) string
- func PadSpace(s string, size int) string
- func Search(s string, list []string) int
- func Unique(ss []string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Filter ¶ added in v0.17.0
Filter will run the function for every entry of the slice and will return a new slice with the entries that return true when used on the function
func ListForHumans ¶ added in v0.38.0
ListForHumans returns a string listing the strings from the parameter
Example: ListForHumans([]string{"one", "two", "three"}) will output: "one, two and three"
func Map ¶ added in v0.17.0
Map will apply the map function provided on every entry of the string slice and return a slice with the changes
func Normalize ¶
Normalize a string removes all non-english characters and lower case the string to help compare it with other strings
func PadSpace ¶ added in v0.38.0
PadSpace will add spaces to the end of a string until it reaches the size set at the second parameter
Types ¶
This section is empty.