Documentation
¶
Index ¶
- func BytesToString(b []byte) string
- func CsvToNumbers[T Numeric](s string) ([]T, error)
- func NumbersToCsv[T Numeric](numbers []T) string
- func NumbersToStrings[T Numeric](numbers []T) []string
- func StringToBytes(s string) []byte
- func StringsToNumbers[T Numeric](strSlice []string) ([]T, error)
- func ToBytes(value any) ([]byte, error)
- func ToSlice(data any) []any
- func ToString(value any) (string, error)
- type Numeric
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesToString ¶
BytesToString converts byte slice to text without memory allocation.
func CsvToNumbers ¶ added in v0.2.0
CsvToNumbers converts a comma-separated string to a slice of the specified numeric type. Returns the slice and any conversion error encountered.
func NumbersToCsv ¶ added in v0.2.0
NumbersToCsv 将int64 slice转换成用逗号分隔的字符串: 1,2,3
func NumbersToStrings ¶ added in v0.2.0
NumbersToStrings converts a slice of numeric types to a slice of strings.
func StringToBytes ¶
StringToBytes converts text to byte slice without memory allocation.
func StringsToNumbers ¶ added in v0.2.0
StringsToNumbers converts a string slice to numeric slice with error handling
Types ¶
Click to show internal directories.
Click to hide internal directories.