Documentation
¶
Overview ¶
Package str contains string functions
Index ¶
- func CleanSplit(text, sep string) []string
- func CleanSplitN(text, sep string, n int) []string
- func CleanSplitter(sep string) func(string) []string
- func CleanSplitterN(sep string, n int) func(string) []string
- func Guard(text, guard string) string
- func IsEmpty(text string) bool
- func Join(glue string, parts ...string) string
- func Len(text string) int
- func NotEmpty(text string) bool
- func Repeat(count int, text, glue string) string
- func SpaceSplit(text string) []string
- func Wrap(text, wrapper string) string
- func WrapList(items []string, wrapper string) string
- type Builder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanSplit ¶
CleanSplit splits the text by separator, and trims each part's extra whitespace
func CleanSplitN ¶
CleanSplitN splits the text by separator, maximum of N parts, then trims each part's extra whitespace
func CleanSplitter ¶
CleanSplitter creates a function that splits the text by separator, and trims each part's extra whitespace
func CleanSplitterN ¶
CleanSplitterN creates a function that splits the text by separator, maximum of N parts, and trims each part's whitespace
func Guard ¶
Guard returns the guard string if given string is empty, otherwise returns the given string
Types ¶
Click to show internal directories.
Click to hide internal directories.