Documentation
¶
Index ¶
- func StringAddURLParam(url, name, value string) string
- func StringCSV(records [][]string) string
- func StringConvertTime(timeString string, formatIn string, formatOut string) (string, *errorAVA.Error)
- func StringEndsWithNumber(str string) bool
- func StringEscapeJSON(jsonString string) string
- func StringFilter(f func(string) bool, data []string) []string
- func StringFind(str, token string) (remainder string, found bool)
- func StringFindBetween(str, start, stop string) (between, remainder string, found bool)
- func StringFormatBigInt(mem uint64) string
- func StringFormatMemory(mem uint64) string
- func StringInSlice(s string, slice []string) bool
- func StringJoin(values interface{}, sep string) string
- func StringJoinFormat(format string, values interface{}, sep string) string
- func StringListContains(l []string, s string) bool
- func StringListContainsCaseInsensitive(l []string, s string) bool
- func StringMD5Hex(data string) string
- func StringMapFunc(f func(string) string, data []string) []string
- func StringMapGroupedNumberPostfixSortedKeys(m map[string]string) []string
- func StringMapGroupedNumberPostfixSortedValues(m map[string]string) []string
- func StringMapSortedKeys(m map[string]string) []string
- func StringMarshalJSON(data interface{}, indent string) string
- func StringPrettifyJSON(compactJSON string) string
- func StringReplaceHTMLTags(text, replacement string) (plainText string)
- func StringReplaceMulti(s string, fromTo ...string) string
- func StringSHA1Base64(data string) string
- func StringSplitNumberPostfix(str string) (base, number string)
- func StringSplitOnce(str, sep string) (pre, post string)
- func StringSplitOnceChar(str string, sep byte) (pre, post string)
- func StringSplitOnceRune(str string, sep rune) (pre, post string)
- func StringStripHTMLTags(text string) (plainText string)
- func StringToBool(s string) bool
- func StringToFloat(s string) float64
- func StringToInt(s string) int
- func StringToLower(str string) string
- func StringToLowerCamelCase(str string) string
- func StringToUpper(str string) string
- func StringToUpperCamelCase(str string) string
- type String
- func (s *String) AddURLParam(url, name, value string) string
- func (s *String) CSV(records [][]string) string
- func (s *String) ConvertTime(timeString string, formatIn string, formatOut string) (string, *errorAVA.Error)
- func (s *String) EndsWithNumber(str string) bool
- func (s *String) EscapeJSON(jsonString string) string
- func (s *String) Filter(f func(string) bool, data []string) []string
- func (s *String) Find(str, token string) (remainder string, found bool)
- func (s *String) FindBetween(str, start, stop string) (between, remainder string, found bool)
- func (s *String) FormatBigInt(mem uint64) string
- func (s *String) FormatMemory(mem uint64) string
- func (s *String) InSlice(str string, slice []string) bool
- func (s *String) Join(values interface{}, sep string) string
- func (s *String) JoinFormat(format string, values interface{}, sep string) string
- func (s *String) ListContains(l []string, str string) bool
- func (s *String) ListContainsCaseInsensitive(l []string, str string) bool
- func (s *String) MD5Hex(data string) string
- func (s *String) MapFunc(f func(string) string, data []string) []string
- func (s *String) MapGroupedNumberPostfixSortedKeys(m map[string]string) []string
- func (s *String) MapGroupedNumberPostfixSortedValues(m map[string]string) []string
- func (s *String) MapSortedKeys(m map[string]string) []string
- func (s *String) MarshalJSON(data interface{}, indent string) string
- func (s *String) PrettifyJSON(compactJSON string) string
- func (s *String) ReplaceHTMLTags(text, replacement string) (plainText string)
- func (s *String) ReplaceMulti(str string, fromTo ...string) string
- func (s *String) SHA1Base64(data string) string
- func (s *String) SplitNumberPostfix(str string) (base, number string)
- func (s *String) SplitOnce(str, sep string) (pre, post string)
- func (s *String) SplitOnceChar(str string, sep byte) (pre, post string)
- func (s *String) SplitOnceRune(str string, sep rune) (pre, post string)
- func (s *String) StripHTMLTags(text string) (plainText string)
- func (s *String) ToBool(str string) bool
- func (s *String) ToFloat(str string) float64
- func (s *String) ToInt(str string) int
- func (s *String) ToLower(str string) string
- func (s *String) ToLowerCamelCase(str string) string
- func (s *String) ToUpper(str string) string
- func (s *String) ToUpperCamelCase(str string) string
- type StringGroupedNumberPostfixSorter
- type StringI
- type StringMap
- type StringSet
- func (set StringSet) Clone() StringSet
- func (set StringSet) Delete(s string)
- func (set StringSet) Exclude(other StringSet)
- func (set StringSet) Has(s string) bool
- func (set StringSet) Join(other StringSet)
- func (set StringSet) ReverseSorted() []string
- func (set StringSet) Set(s string)
- func (set StringSet) Sorted() []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StringAddURLParam ¶
func StringConvertTime ¶
func StringEndsWithNumber ¶
func StringEscapeJSON ¶
func StringFind ¶
func StringFindBetween ¶
func StringFormatBigInt ¶
func StringFormatMemory ¶
func StringInSlice ¶
func StringJoin ¶
func StringJoinFormat ¶
func StringListContains ¶
func StringMD5Hex ¶
func StringMapSortedKeys ¶
func StringMarshalJSON ¶
func StringPrettifyJSON ¶
func StringReplaceHTMLTags ¶
func StringReplaceMulti ¶
func StringSHA1Base64 ¶
func StringSplitOnce ¶
func StringSplitOnceChar ¶
func StringSplitOnceRune ¶
func StringStripHTMLTags ¶
func StringToBool ¶
func StringToFloat ¶
func StringToInt ¶
func StringToLower ¶
func StringToLowerCamelCase ¶
func StringToUpper ¶
func StringToUpperCamelCase ¶
Types ¶
type String ¶
type String string
func GetInstance ¶
func GetInstance() *String
func (*String) AddURLParam ¶
func (*String) ConvertTime ¶
func (*String) EndsWithNumber ¶
func (*String) EscapeJSON ¶
func (*String) Find ¶
Find returns in found if token has been found in s, and returns the remaining string afte token in remainder. The whole string s will be returned if found is false.
func (*String) FindBetween ¶
FindBetween returns the string between the first occurrences of the tokens start and stop. The remainder of the string after the stop token will be returned if found. If the tokens couldn't be found, then the whole string will be returned as remainder.
func (*String) FormatBigInt ¶
func (*String) FormatMemory ¶
func (*String) Join ¶
Join formats every value in values according to its default formatting and joins the result with sep as separator. values must be a slice of a formatable type
func (*String) JoinFormat ¶
JoinFormat formats every value in values with format and joins the result with sep as separator. values must be a slice of a formatable type
func (*String) ListContainsCaseInsensitive ¶
func (*String) MapGroupedNumberPostfixSortedKeys ¶
func (*String) MapGroupedNumberPostfixSortedValues ¶
func (*String) MarshalJSON ¶
MarshalJSON marshals data to an indented string.
func (*String) PrettifyJSON ¶
func (*String) ReplaceHTMLTags ¶
ReplaceHTMLTags replaces HTML/XML tags from text with replacement.
func (*String) SHA1Base64 ¶
SHA1Base64 returns the base64 encoded SHA1 hash of data
func (*String) SplitNumberPostfix ¶
func (*String) SplitOnceChar ¶
func (*String) SplitOnceRune ¶
func (*String) StripHTMLTags ¶
StripHTMLTags strips HTML/XML tags from text.
func (*String) ToLowerCamelCase ¶
func (*String) ToUpperCamelCase ¶
type StringGroupedNumberPostfixSorter ¶
type StringGroupedNumberPostfixSorter []string
func (StringGroupedNumberPostfixSorter) Len ¶
func (s StringGroupedNumberPostfixSorter) Len() int
Len is the number of elements in the collection.
func (StringGroupedNumberPostfixSorter) Less ¶
func (s StringGroupedNumberPostfixSorter) Less(i, j int) bool
Less reports whether the element with index i should sort before the element with index j.
func (StringGroupedNumberPostfixSorter) Swap ¶
func (s StringGroupedNumberPostfixSorter) Swap(i, j int)
Swap swaps the elements with indexes i and j.
type StringI ¶
type StringI interface {
MarshalJSON(data interface{}, indent string) string
ListContains(l []string, s string) bool
ListContainsCaseInsensitive(l []string, s string) bool
PrettifyJSON(compactJSON string) string
EscapeJSON(jsonString string) string
StripHTMLTags(text string) (plainText string)
ReplaceHTMLTags(text, replacement string) (plainText string)
MD5Hex(data string) string
SHA1Base64(data string) string
AddURLParam(url, name, value string) string
ConvertTime(timeString string, formatIn string, formatOut string) (string, *errorAVA.Error)
CSV(records [][]string) string
ToInt(s string) int
ToFloat(s string) float64
ToBool(s string) bool
InSlice(s string, slice []string) bool
JoinFormat(format string, values interface{}, sep string) string
Join(values interface{}, sep string) string
FormatBigInt(mem uint64) string
FormatMemory(mem uint64) string
ReplaceMulti(str string, fromTo ...string) string
ToUpperCamelCase(str string) string
ToLowerCamelCase(str string) string
ToLower(str string) string
ToUpper(str string) string
MapSortedKeys(m map[string]string) []string
MapGroupedNumberPostfixSortedKeys(m map[string]string) []string
MapGroupedNumberPostfixSortedValues(m map[string]string) []string
EndsWithNumber(s string) bool
SplitNumberPostfix(s string) (base, number string)
SplitOnce(s, sep string) (pre, post string)
SplitOnceChar(s string, sep byte) (pre, post string)
SplitOnceRune(s string, sep rune) (pre, post string)
MapFunc(f func(string) string, data []string) []string
Filter(f func(string) bool, data []string) []string
FindBetween(s, start, stop string) (between, remainder string, found bool)
Find(s, token string) (remainder string, found bool)
}
type StringMap ¶
StringMap is a map[string]string.
func (StringMap) MarshalXML ¶
StringMap marshals into XML.
func (StringMap) UnmarshalXML ¶
type StringSet ¶
type StringSet map[string]struct{}
StringSet wraps map[string]struct{} with some useful methods.