convert

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolToString

func BoolToString(b bool) string

BoolToString 布尔类型转字符串类型

基于 strconv.FormatBool 实现

func FloatToString

func FloatToString(f float64) string

FloatToString 浮点类型转字符串类型

基于 strconv.FormatFloat 实现

func Int64ToString

func Int64ToString(i int64) string

Int64ToString 整数类型转字符串类型

基于 strconv.FormatBool 实现

func IntToString

func IntToString(i int) string

IntToString 整型转字符串类型

基于 strconv.Itoa 实现

func StringToBool

func StringToBool(s string) (bool, error)

StringToBool 字符串转布尔

基于 strconv.FormatBool 实现

func StringToFloat

func StringToFloat(s string) (float64, error)

StringToFloat 字符串转浮点数类型

基于 strconv.ParseFloat 实现

func StringToInt

func StringToInt(s string) (int, error)

StringToInt 字符串转整型

基于 strconv.Atoi 实现

func StringToInt64

func StringToInt64(s string) (int64, error)

StringToInt64 字符串转整数类型

基于 strconv.ParseInt 实现

默认转为十进制,其它进制请直接使用 strconv.ParseInt

func StringToUint64

func StringToUint64(s string) (uint64, error)

StringToUint64 字符串转无符号整数类型

基于 strconv.ParseUint 实现

默认转为十进制,其它进制请直接使用 strconv.ParseUint

func Uint64ToString

func Uint64ToString(i uint64) string

Uint64ToString 无符号整型类型转字符串类型

基于 strconv.FormatBool 实现

Types

This section is empty.

Jump to

Keyboard shortcuts

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