strx

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(b []byte) ([]byte, error)

func DecryptDsn

func DecryptDsn(dsn string) (string, error)

func DeepSplit

func DeepSplit(ss []string, sep string) [][]string

func DuplicateName

func DuplicateName(name string, add int) string

DuplicateName create 'name_1' for 'name', 'name_2' for 'name_1'

func Encrypt

func Encrypt(b []byte) string

func EncryptDsn

func EncryptDsn(dsn string) string

func RandomRune

func RandomRune() rune

func RandomString

func RandomString(length int) string

func SetDsnKey

func SetDsnKey(key string)

func Slice2to1

func Slice2to1(slice [][]string) []string

func SliceContains

func SliceContains(slice []string, s string) bool

func SliceRepeat

func SliceRepeat(elem string, l int) []string

func SlicifyStr

func SlicifyStr(seed string, length int) []string

func SubAfter

func SubAfter(s, sep, def string) string

func SubAfterLast

func SubAfterLast(s, sep, def string) string

func SubBefore

func SubBefore(s, sep, def string) string

func SubBeforeLast

func SubBeforeLast(s, sep, def string) string

func ToCamelCase

func ToCamelCase(s string) string

ToCamelCase converts a string to CamelCase

func ToDelimited

func ToDelimited(s string, delimiter uint8) string

ToDelimited converts a string to delimited.snake.case (in this case `delimiter = '.'`)

func ToKebab

func ToKebab(s string) string

ToKebab converts a string to kebab-case

func ToLowerCamel

func ToLowerCamel(s string) string

ToLowerCamel converts a string to lowerCamelCase

func ToScreamingDelimited

func ToScreamingDelimited(s string, delimiter, ignore uint8, screaming bool) string

ToScreamingDelimited converts a string to SCREAMING.DELIMITED.SNAKE.CASE (in this case `delimiter = '.'; screaming = true`) or delimited.snake.case (in this case `delimiter = '.'; screaming = false`)

func ToScreamingKebab

func ToScreamingKebab(s string) string

ToScreamingKebab converts a string to SCREAMING-KEBAB-CASE

func ToScreamingSnake

func ToScreamingSnake(s string) string

ToScreamingSnake converts a string to SCREAMING_SNAKE_CASE

func ToSnakeCase

func ToSnakeCase(s string) string

ToSnakeCase converts a string to snake_case

func ToSnakeWithIgnore

func ToSnakeWithIgnore(s string, ignore uint8) string

func TrimBoth

func TrimBoth(s, trim string) string

func TrimEnd

func TrimEnd(s, trim string) string

func TrimStart

func TrimStart(s, trim string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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