Documentation ¶
Index ¶
- Variables
- func AddClassNamesToNjnBlock(data map[string]interface{}, classes ...string) map[string]interface{}
- func AppendWithSpace(src, add string) (combined string)
- func Empty(value string) (empty bool)
- func EscapeHtmlAttribute(unescaped string) (escaped string)
- func FirstName(fullName string) (firstName string)
- func GetBasicMime(mime string) (basic string)
- func IsFalse(text string) bool
- func IsTrue(text string) bool
- func LastName(fullName string) (lastName string)
- func LowerStrings(in ...string) (out []string)
- func ParseHtmlTagAttributes(input interface{}) (attributes map[string]interface{}, err error)
- func PathToSnake(path string) (snake string)
- func QuoteJsonValue(in string) (out string)
- func RemoveIndexFromStrings(idx int, slice []string) []string
- func RemoveValueFromSlice(value string, slice *[]string) (modified bool)
- func StringInSlices(src string, dst ...[]string) bool
- func StringInStrings(src string, dst ...string) bool
- func StringIndexInSlice(src string, dst []string) int
- func StringIndexInStrings(src string, dst ...string) int
- func StringsToKebabs(in ...string) (out []string)
- func StripTmplTags(value string) (clean string)
- func TitleCase(input string) (output string)
- func TrimPrefixes(value string, prefixes ...string) (trimmed string)
- func TrimQuotes(quoted string) (unquoted string)
- func UniqueFromSpaceSep(value string, original []string) (updated []string)
- type SortByLengthAsc
- type SortByLengthDesc
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RxParseHtmlTagKeyOnly = regexp.MustCompile(`^([a-zA-Z][-a-zA-Z0-9]+)$`) RxParseHtmlTagKeyValue = regexp.MustCompile(`^([a-zA-Z][-a-zA-Z0-9]+)=(.+?)$`) RxSplitHtmlTagAttributes = regexp.MustCompile(`\s+`) )
View Source
var RxBasicMimeType = regexp.MustCompile(`^\s*([^\s;]*)\s*.+?\s*$`)
View Source
var RxEmpty = regexp.MustCompile(`(?ms)\A\s*\z`)
View Source
var RxQuoteStringsOnly = regexp.MustCompile(`(?i)^(true|false|-?\d*[.,]?\d*)$`)
View Source
var RxTmplTags = regexp.MustCompile(`\{\{.+?}}`)
View Source
var RxWord = regexp.MustCompile(`\w+`)
Functions ¶
func AddClassNamesToNjnBlock ¶
func AppendWithSpace ¶
func EscapeHtmlAttribute ¶
func GetBasicMime ¶
func LowerStrings ¶
func ParseHtmlTagAttributes ¶
func PathToSnake ¶ added in v0.2.0
func QuoteJsonValue ¶
QuoteJsonValue will quote everything other than numbers or boolean text
func RemoveIndexFromStrings ¶
func RemoveValueFromSlice ¶ added in v0.1.0
func StringInSlices ¶
func StringInStrings ¶
func StringIndexInSlice ¶
func StringIndexInStrings ¶
func StringsToKebabs ¶
func StripTmplTags ¶
func TrimPrefixes ¶
func TrimQuotes ¶
func UniqueFromSpaceSep ¶
Types ¶
type SortByLengthAsc ¶
type SortByLengthAsc []string
func (SortByLengthAsc) Len ¶
func (a SortByLengthAsc) Len() int
func (SortByLengthAsc) Less ¶
func (a SortByLengthAsc) Less(i, j int) bool
func (SortByLengthAsc) Swap ¶
func (a SortByLengthAsc) Swap(i, j int)
type SortByLengthDesc ¶
type SortByLengthDesc []string
func (SortByLengthDesc) Len ¶
func (a SortByLengthDesc) Len() int
func (SortByLengthDesc) Less ¶
func (a SortByLengthDesc) Less(i, j int) bool
func (SortByLengthDesc) Swap ¶
func (a SortByLengthDesc) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.