util

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

其他工具栏

Index

Constants

View Source
const (
	// 9+26+26+3
	NumberStr = "0123456789abcdefghijklmnopkrstuvwxyzABCDEFGHIJKLMNOPKRSTUVWXYZ+-="
	//进制类型
	N2  = 2
	N8  = 8
	N16 = 16
	N32 = 32
	N36 = 36
	N62 = 62
)

@Date: 2018/12/12 0012 13:45 @Author: Joshua Conero @Name: 10 进制处理

Variables

This section is empty.

Functions

func DecT36 added in v0.4.1

func DecT36(num int) string

数据进制转换

func DecT62 added in v0.4.1

func DecT62(num int) string

数据进制转换

func InQue

func InQue(val interface{}, que []interface{}) int

数组中是否存在 不存在返回 -1

func Round added in v0.2.0

func Round(num float64, b int) float64

字符串方法处理float等长数据 规定位数

func Sec added in v0.2.0

func Sec(start float64) float64

返回秒用于计算程序用时,参数为0时返回当前的毫秒,否则返回计算后的秒差

func SecCall added in v0.5.0

func SecCall() func() float64

返回运算秒的秒数

func SecCallStr added in v0.5.0

func SecCallStr() func() string

返回字符串式的运行毫秒

Types

type BaseError added in v0.3.0

type BaseError struct {
	Msg string
}

基本处理类

func (*BaseError) Error added in v0.3.0

func (be *BaseError) Error() string

type Decimal added in v0.4.1

type Decimal struct {
	// contains filtered or unexported fields
}

func NewDec added in v0.4.1

func NewDec(dec int) *Decimal

十进制

func (*Decimal) T16 added in v0.4.1

func (d *Decimal) T16() string

16 进制

func (*Decimal) T2 added in v0.4.1

func (d *Decimal) T2() string

2 进制

func (*Decimal) T32 added in v0.4.1

func (d *Decimal) T32() string

32 进制

func (*Decimal) T36 added in v0.4.1

func (d *Decimal) T36() string

36 进制

func (*Decimal) T62 added in v0.4.1

func (d *Decimal) T62() string

func (*Decimal) T8 added in v0.4.1

func (d *Decimal) T8() string

8 进制

func (*Decimal) ToN added in v0.4.1

func (d *Decimal) ToN(base int) string

转化为N进制

Jump to

Keyboard shortcuts

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