runtimelib

package
v0.0.0-...-d6b0b83 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2026 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyToString

func AnyToString(v interface{}) string

AnyToString converts any interface{} to string

func BoolToString

func BoolToString(b bool) string

BoolToString converts a bool to string ("true" or "false")

func ContainsString

func ContainsString(s, substr string) bool

ContainsString checks if a string contains a substring

func Float64ToString

func Float64ToString(f float64) string

Float64ToString converts a float64 to string

func Float64ToStringFixed

func Float64ToStringFixed(f float64, precision int) string

Float64ToStringFixed converts a float64 to string with fixed decimal places

func HasPrefix

func HasPrefix(s, prefix string) bool

HasPrefix checks if a string starts with a prefix

func HasSuffix

func HasSuffix(s, suffix string) bool

HasSuffix checks if a string ends with a suffix

func Int64ToString

func Int64ToString(i int64) string

Int64ToString converts an int64 to string

func IntToString

func IntToString(i int) string

IntToString converts an int to string

func JoinStrings

func JoinStrings(sep string, parts ...string) string

JoinStrings joins a slice of strings with a separator

func SplitString

func SplitString(s, sep string) []string

SplitString splits a string by separator

func StringToAny

func StringToAny(s string) interface{}

StringToAny converts a string to the most appropriate type

func StringToBool

func StringToBool(s string) bool

StringToBool converts a string to bool

func StringToBoolSafe

func StringToBoolSafe(s string) (bool, bool)

StringToBoolSafe converts a string to bool, returns value and error flag

func StringToFloat64

func StringToFloat64(s string) float64

StringToFloat64 converts a string to float64, returns 0 on error

func StringToFloat64Safe

func StringToFloat64Safe(s string) (float64, bool)

StringToFloat64Safe converts a string to float64, returns value and error flag

func StringToInt

func StringToInt(s string) int

StringToInt converts a string to int, returns 0 on error

func StringToInt64

func StringToInt64(s string) int64

StringToInt64 converts a string to int64, returns 0 on error

func StringToIntSafe

func StringToIntSafe(s string) (int, bool)

StringToIntSafe converts a string to int, returns value and error flag

func StringToUint

func StringToUint(s string) uint

StringToUint converts a string to uint, returns 0 on error

func StringToUint64

func StringToUint64(s string) uint64

StringToUint64 converts a string to uint64, returns 0 on error

func ToStringSlice

func ToStringSlice(slice interface{}) []string

ToStringSlice converts any slice to []string

func Uint64ToString

func Uint64ToString(u uint64) string

Uint64ToString converts a uint64 to string

func UintToString

func UintToString(u uint) string

UintToString converts a uint to string

Types

This section is empty.

Jump to

Keyboard shortcuts

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