strings

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RxBasicMimeType = regexp.MustCompile(`^\s*([^\s;]*)\s*.+?\s*$`)

Functions

func AddClassNamesToNjnBlock

func AddClassNamesToNjnBlock(data map[string]interface{}, classes ...string) map[string]interface{}

func AnyStringsInStrings added in v0.2.11

func AnyStringsInStrings(src, tgt []string) (found bool)

func AppendWithSpace

func AppendWithSpace(src, add string) (combined string)

func Empty

func Empty(value string) (empty bool)

func EscapeHtmlAttribute

func EscapeHtmlAttribute(unescaped string) (escaped string)

func FirstName

func FirstName(fullName string) (firstName string)

func GetBasicMime

func GetBasicMime(mime string) (basic string)

func IsFalse

func IsFalse(text string) bool

func IsTrue

func IsTrue(text string) bool

func LastName

func LastName(fullName string) (lastName string)

func LowerStrings

func LowerStrings(in ...string) (out []string)

func ParseHtmlTagAttributes

func ParseHtmlTagAttributes(input interface{}) (attributes map[string]interface{}, err error)

func PathToSnake added in v0.2.0

func PathToSnake(path string) (snake string)

func QuoteJsonValue

func QuoteJsonValue(in string) (out string)

QuoteJsonValue will quote everything other than numbers or boolean text

func SortedByLastName added in v0.2.11

func SortedByLastName(data []string) (keys []string)

func StringIndexInSlice

func StringIndexInSlice(src string, dst []string) int

func StringIndexInStrings

func StringIndexInStrings(src string, dst ...string) int

func StringsToKebabs

func StringsToKebabs(in ...string) (out []string)

func StripTmplTags

func StripTmplTags(value string) (clean string)

func TitleCase

func TitleCase(input string) (output string)

func TrimPrefixes

func TrimPrefixes(value string, prefixes ...string) (trimmed string)

func TrimQuotes

func TrimQuotes(maybeQuoted string) (unquoted string)

func UniqueFromSpaceSep

func UniqueFromSpaceSep(value string, original []string) (updated []string)

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL