Documentation ¶
Index ¶
- func AllOrSomeFilter(list, filterList []string) []string
- func FormatUsername(s string) string
- func List(n int, do func(i int) string) []string
- func NoDash(s string) string
- func NoNumberPrefix(s string) string
- func StringBetween(s, start, end string) string
- func Title(s string) string
- func ToUpperFirst(s string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllOrSomeFilter ¶
AllOrSomeFilter filters elems out from the list as they present in filterList and returns the remaining ones. if filterList is empty, all elems from list returned.
func FormatUsername ¶
FormatUsername formats a username to make it usable as a variable.
func List ¶
List returns a slice of strings captured after the value returned by do which is called n times.
func NoNumberPrefix ¶
NoNumberPrefix adds an underscore at the beginning of the string if it stars with a number this is used for package of proto files template because the package name can't start with a number.
func StringBetween ¶
StringBetween returns the string between two other strings. The comparison is not greedy so the between result includes the string between the start value and the first match of the end value.
func Title ¶
Title returns a copy of the string s with all Unicode letters that begin words mapped to their Unicode title case.
func ToUpperFirst ¶
ToUpperFirst returns a copy of the string with the first unicode letter in upper case.
Types ¶
This section is empty.