Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CondenseAcronyms ¶
func CondenseAcronyms(parts *[]string, options ...CondenseOptFunc)
Example ¶
var parts = []string{"abc", "a", "b", "c", "abc"} CondenseAcronyms(&parts, WithAcronymMap(map[string]struct{}{"abc": {}})) fmt.Println(parts)
Output: [abc abc abc]
func RemoveAccents ¶
Example ¶
fmt.Println(RemoveAccents("Pokémon"))
Output: Pokemon
func SplitByUpper ¶
Example ¶
fmt.Println(SplitByUpper("abcABCAbc"))
Output: [abc a b c abc]
Types ¶
type CondenseOptFunc ¶
type CondenseOptFunc func(o *condenseOpts)
func WithAcronymMap ¶
func WithAcronymMap(acronyms map[string]struct{}) CondenseOptFunc
func WithAfter ¶
func WithAfter(condenseAfterIdx int) CondenseOptFunc
Example ¶
var o condenseOpts WithAfter(0)(&o) fmt.Println(o)
Output: {map[] 0}
Click to show internal directories.
Click to hide internal directories.