str

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyToString

func AnyToString(a any) (string, error)

func AnyValueToString

func AnyValueToString(k string, m map[string]any) (string, error)

func First

func First(vs ...string) string

First returns the first non-zero valued string

func FirstIn

func FirstIn(m map[string]any, keys ...string) string

FirstIn returns the first entry in the map with a non-zero value when iterating the provided list of keys.

func GenerateHash

func GenerateHash(input []byte) string

func ParseBool

func ParseBool(v string) bool

parseBool returns the bool value represented by the string or false on error

func Preview

func Preview(s string, size int) string

Preview reduces the string to the specified size. If the string is longer than the size, the last three characters are replaced with an ellipsis. Size < 4 will default to 4. ex: Preview("123", 6) => "123" Preview("1234567", 6) "123..."

func SliceToMap

func SliceToMap(ss []string) map[string]struct{}

Types

This section is empty.

Jump to

Keyboard shortcuts

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