Documentation
¶
Index ¶
- func CloneMap[K comparable, V any](src map[K]V) map[K]V
- func CloneSlice[T any](src []T) []T
- func Contains(s, substr string) bool
- func DedupeNonEmptyStrings(values []string) []string
- func DedupeSortedStrings(values []string) []string
- func FirstTrimmed(values ...string) string
- func HasPrefix(s, prefix string) bool
- func Lower(s string) string
- func LowerTrim(s string) string
- func SamePath(a, b string) bool
- func SamePathOrBothEmpty(a, b string) bool
- func SortedKeys[M ~map[K]V, K ~string, V any](m M) []K
- func Trim(s string) string
- func TrimLeadingOnce(s string) string
- func TrimLeft(s string) string
- func TrimRight(s string) string
- func UpperTrim(s string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloneMap ¶ added in v0.40.1
func CloneMap[K comparable, V any](src map[K]V) map[K]V
func CloneSlice ¶ added in v0.23.6
func CloneSlice[T any](src []T) []T
func DedupeNonEmptyStrings ¶
DedupeNonEmptyStrings returns a copy of values without empty strings or duplicates, preserving order.
func DedupeSortedStrings ¶ added in v0.17.1
DedupeSortedStrings removes consecutive duplicates from a sorted slice.
func FirstTrimmed ¶ added in v0.28.1
func SamePath ¶ added in v0.35.1
SamePath reports whether two non-empty paths resolve to the same lexical path.
It does not stat files or resolve symlinks; use os.SameFile with os.Stat results when physical file identity is required.
func SamePathOrBothEmpty ¶ added in v0.35.1
SamePathOrBothEmpty reports whether a and b are both empty or name the same path.
func SortedKeys ¶ added in v0.23.6
func TrimLeadingOnce ¶ added in v0.28.1
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.