strutil

package
v0.0.0-...-74e38f5 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2025 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UuidRegexp = regexp.MustCompile("^[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}$")
)

Functions

func CamelToSnakeCase

func CamelToSnakeCase(in string) string

Converts a string to Snake Case (lowercase)

func Index

func Index(xs []string, a string) int

func IsEqual

func IsEqual(a, b []string) bool

func IsUuid

func IsUuid(s string) bool

func SplitBefore

func SplitBefore(s, sep string) (out []string)

SplitBefore includes the separator as the first character. This is similar to strings.SplitAfter but instead of splitting "after" the character, it does so before.

Taken from https://go.dev/play/p/P4rZvBAuSih. Removed the first if statement to stay analogous to strings.SplitAfter

func StringInList

func StringInList(xs []string, a string) bool

func ToISO_8859_1

func ToISO_8859_1(str string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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