Documentation
¶
Index ¶
- func AnyString[T ~string | ~[]byte](v T) string
- func Atoi(s string) (int, error)
- func ByteBytes(v string) []byte
- func ByteCopy(s string) []byte
- func BytePointer(v string) []byte
- func ByteSlice(v string) []byte
- func Float32(f float32) string
- func Float64(f float64) string
- func Int64ToString(v int64) string
- func IntToString(v int) string
- func Itoa(i int) string
- func StringPointer(v []byte) string
- func StringSlice(v []byte) string
- func StringStrings(v []byte) string
- func StringToInt(v string) int
- func StringToInt64(v string) int64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyString ¶ added in v1.6.0
Note that this method is extremely dangerous, please do not use this method unless absolutely necessary!
Before generics were used, this method could cause memory usage exceptions, leading to system unresponsiveness (no matter how much memory is installed). This problem has been fixed by adding generics, but there is no guarantee that memory exceptions will not continue to occur in the future.
----------------------------------------------------------------
This method is used to convert any type to a string type. However, please note that not all types can be converted.
Abusing this method can lead to program crashes or even system crashes. So before converting, please test in a virtual environment whether the type you want to convert can be converted, in order to avoid loss.
func BytePointer ¶ added in v1.5.0
func Int64ToString ¶ added in v1.1.0
func IntToString ¶ added in v1.1.0
func StringPointer ¶ added in v1.5.0
func StringSlice ¶ added in v1.5.0
func StringStrings ¶ added in v1.6.0
func StringToInt ¶ added in v1.1.0
func StringToInt64 ¶ added in v1.1.0
Types ¶
This section is empty.