Documentation ¶
Index ¶
- func BytesToString(b []byte) string
- func ContainsAll(str string, sub ...string) bool
- func ContainsAny(str string, sub ...string) bool
- func HasHTTPPrefix(str string) bool
- func HasPrefixAny(str string, prefix ...string) bool
- func HasSuffixAny(str string, suffix ...string) bool
- func Render(str string, data map[string]string) string
- func Replace(str string, oldNew ...string) string
- func StringToBytes(s string) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesToString ¶
func ContainsAll ¶
func ContainsAny ¶
func HasHTTPPrefix ¶
func HasPrefixAny ¶
func HasSuffixAny ¶
func Render ¶
Render replaces ${var} or $var in the string based on the mapping data, 'var' is key in data map.
func Replace ¶
Replace str from a list of old, new string pairs. Replacements are performed in the order they appear in the target string, without overlapping matches. The old string comparisons are done in argument order.
Replace panics if given an odd number of oldNew arguments.
func StringToBytes ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.