Documentation
¶
Index ¶
- Variables
- func AddClassNamesToNjnBlock(data map[string]interface{}, classes ...string) map[string]interface{}
- func AnyStringsInStrings(src, tgt []string) (found bool)
- func AppendWithSpace(src, add string) (combined string)
- func Diff(filename, a, b string) (patch 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 IncrementFileName(name string) (modified string)
- func IsFalse(text string) bool
- func IsQuoted(maybeQuoted string) (quoted bool)
- func IsTrue(text string) bool
- func LastName(fullName string) (lastName string)
- func LowerStrings(in ...string) (out []string)
- func NameFromEmail(email string) (name string)
- func ParseHtmlTagAttributes(input interface{}) (attributes map[string]interface{}, err error)
- func PathToSnake(path string) (snake string)
- func QuoteJsonValue(in string) (out string)
- func SortedByLastName(data []string) (keys []string)
- 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 ToCamelWords(text string) (capitalized string)
- func ToDeepKey(s string) (deepKey string)
- func ToDeepVar(s string) (deepKey string)
- func ToSpaced(s string) (spaced string)
- func ToSpacedCamel(s string) (spacedCamel string)
- func TrimPrefixes(value string, prefixes ...string) (trimmed string)
- func TrimQuotes(maybeQuoted string) (unquoted string)
- func UniqueFromSpaceSep(value string, original []string) (updated []string)
- type CByteBuffer
- type SortByLengthAsc
- type SortByLengthDesc
Constants ¶
This section is empty.
Variables ¶
var RxBasicMimeType = regexp.MustCompile(`^\s*([^\s;]*)\s*.+?\s*$`)
var (
RxNameSuffix = regexp.MustCompile(`\((\d+)\)\s*$`)
)
Functions ¶
func AddClassNamesToNjnBlock ¶
func AnyStringsInStrings ¶ added in v0.2.11
func AppendWithSpace ¶
func EscapeHtmlAttribute ¶
func GetBasicMime ¶
func IncrementFileName ¶ added in v0.5.0
IncrementFileName will return the given label with a specific number suffix incremented. If the label does not end with the pattern `\(\d+\)\s*$`, one is appended with a space, if the pattern matches no spaces are added and the digit is modified and any trailing space removed
func IsQuoted ¶ added in v0.5.6
IsQuoted returns true if the first and last characters in the input are the same and are one of the three main quote types: single ('), double (") and literal (`)
func LowerStrings ¶
func NameFromEmail ¶ added in v0.5.0
func ParseHtmlTagAttributes ¶
func PathToSnake ¶ added in v0.2.0
func QuoteJsonValue ¶
QuoteJsonValue will quote everything other than numbers or boolean text
func SortedByLastName ¶ added in v0.2.11
func StringIndexInSlice ¶
func StringIndexInStrings ¶
func StringsToKebabs ¶
func StripTmplTags ¶
func ToCamelWords ¶ added in v0.5.0
func ToSpacedCamel ¶ added in v0.5.0
func TrimPrefixes ¶
func TrimQuotes ¶
TrimQuotes returns the string with the first and last characters trimmed from the string if the string IsQuoted and returns the unmodified input string otherwise
func UniqueFromSpaceSep ¶
Types ¶
type CByteBuffer ¶ added in v0.5.0
func NewByteBuffer ¶ added in v0.5.0
func NewByteBuffer() (c *CByteBuffer)
func (*CByteBuffer) Close ¶ added in v0.5.0
func (c *CByteBuffer) Close() error
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)