Back to godoc.org
github.com/DevMine/api-server/util/typeutil

package typeutil

v0.0.0 (d26fc85)
Latest Go to latest
Published: May 2, 2015 | License: BSD-3-Clause | Module: github.com/DevMine/api-server

Overview

Package typeutil provide useful type conversion functions. All numbers are considered base 10 int64 or float64.

Index

func IntToStr

func IntToStr(n int64) string

IntToStr converts 'n' base 10 number to its string representation.

func StrToFloat

func StrToFloat(s string) (f float64, err error)

StrToFloat converts 's' into its float64 form. 's' is expected to be a float in its string representation.

func StrToInt

func StrToInt(s string) (n int64, err error)

StrToInt converts 's' into its int64 form. 's' is expected to contain digits only.

func StrToUint

func StrToUint(s string) (n uint64, err error)

StrToUint converts 's' into its uint64 form. 's' is expected to contain digits only.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier