convert

package
v0.0.0-...-fc20b2c Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(s []string, a string) []string

func HexStr2int

func HexStr2int(hexStr string) (int, error)

HexStr2int converts hex format string to decimal number.

func Int2HexStr

func Int2HexStr(num int) (hex string)

Int2HexStr converts decimal number to hex format string.

func PowInt

func PowInt(x int, y int) int

PowInt is int type of math.Pow function.

func RuneAccumulation

func RuneAccumulation(str string) rune

func StringSort

func StringSort(str1, str2 string) (small, big string)

func StringSortByRune

func StringSortByRune(str1, str2 string) (small, big string)

func ToStr

func ToStr(value interface{}, args ...int) (s string)

Convert any type to string.

func Union

func Union(s []string, a []string) []string

func Uniq

func Uniq(s []string) (r []string)

Types

type StrTo

type StrTo string

Convert string to specify type.

func (StrTo) Exist

func (f StrTo) Exist() bool

func (StrTo) Int

func (f StrTo) Int() (int, error)

func (StrTo) Int64

func (f StrTo) Int64() (int64, error)

func (StrTo) Md5

func (f StrTo) Md5() string

func (StrTo) MustInt

func (f StrTo) MustInt() int

func (StrTo) MustInt64

func (f StrTo) MustInt64() int64

func (StrTo) MustTime

func (f StrTo) MustTime(format ...string) time.Time

func (StrTo) MustUint8

func (f StrTo) MustUint8() uint8

func (StrTo) String

func (f StrTo) String() string

func (StrTo) Time

func (f StrTo) Time(format ...string) (time.Time, error)

String format conversion time format must go time source has been package format

func (StrTo) ToLower

func (f StrTo) ToLower() string

func (StrTo) ToUpper

func (f StrTo) ToUpper() string

func (StrTo) Uint8

func (f StrTo) Uint8() (uint8, error)

Jump to

Keyboard shortcuts

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