Documentation
¶
Index ¶
- func Contains(s []string, e string) bool
- func ExpandWhitespaceLiterals(s string) string
- func InList(strings []string, s string) bool
- func IsURL(s string) bool
- func JoinInt64(ints []int64, delimiter string) string
- func JoinLines(s string) string
- func Pluralize(word string, count int) string
- func Prepend(text string, prefix string) string
- func RemoveBlank(strs []string) []string
- func RemoveDuplicates(strings []string) []string
- func SplitLines(s string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶ added in v0.9.0
Contains returns whether the given slice of strings contains the given string.
func ExpandWhitespaceLiterals ¶ added in v0.6.0
Expand literal escaped whitespace characters in the given string to their actual character.
func JoinLines ¶
JoinLines joins each lines of the given string by replacing the newlines by a single space.
func Prepend ¶
Prepend prefixes each lines of a string with the given prefix. It can be used to indent or quote (> ) a paragraph, for example.
func RemoveBlank ¶ added in v0.8.0
RemoveBlank keeps only non-empty strings in the source.
func RemoveDuplicates ¶
RemoveDuplicates keeps only unique strings in the source.
func SplitLines ¶
SplitLines splits a string by the newlines character in a portable way Using only `strings.Split(s, "\n")` doesn't work on Windows.
Types ¶
This section is empty.