Documentation ¶
Index ¶
- Constants
- type Convert
- func (convert *Convert) BoolToInt(boolValue bool) int
- func (convert *Convert) BoolToString(boolValue bool) string
- func (convert *Convert) FloatToString(f float64, fmt byte, prec, bitSize int) string
- func (convert *Convert) IntToBool(number int) bool
- func (convert *Convert) IntToString(number int64, base int) string
- func (convert *Convert) IntToTenString(number int) string
- func (convert *Convert) StringToInt(str string) int
- func (convert *Convert) StringToInt64(str string) int64
- type Date
- type Encrypt
- func (encrypt *Encrypt) Base64Decode(str string) (string, error)
- func (encrypt *Encrypt) Base64DecodeBytes(str string) ([]byte, error)
- func (encrypt *Encrypt) Base64Encode(str string) string
- func (encrypt *Encrypt) Base64EncodeBytes(bytes []byte) []byte
- func (encrypt *Encrypt) Md5Encode(str string) string
- type Misc
- type Urls
Constants ¶
View Source
const (
BASE_64_TABLE = "1234567890poiuytreqwasdfghjklmnbvcxzQWERTYUIOPLKJHGFDSAZXCVBNM-_"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Convert ¶
type Convert struct{}
func NewConvert ¶
func NewConvert() *Convert
func (*Convert) BoolToString ¶
bool 转化为字符串
func (*Convert) FloatToString ¶
float 转化为字符串
func (*Convert) IntToString ¶
int 转化为字符串 base 范围 2-32 进制
func (*Convert) IntToTenString ¶
int 转化为10进制字符串 IntToString(number, 10)
func (*Convert) StringToInt ¶
string to int(10进制)
func (*Convert) StringToInt64 ¶
string to int64(10进制)
type Encrypt ¶
type Encrypt struct{}
func NewEncrypt ¶
func NewEncrypt() *Encrypt
func (*Encrypt) Base64Decode ¶
base64 解密
func (*Encrypt) Base64DecodeBytes ¶
base64 解密
func (*Encrypt) Base64EncodeBytes ¶
base64 加密
type Misc ¶
type Misc struct{}
func (*Misc) Page ¶
*
- 分页方法
- @param type $total 一共多少记录
- @param type $page 当前是第几页
- @param type $pagesize 每页多少
- @param type $url url是什么,url里面的{page}会被替换成页码
- @param array $order 分页条的组成,是一个数组,可以按着1-6的序号,选择分页条组成部分和每个部分的顺序
- @param int $a_count 分页条中a页码链接的总数量,不包含当前页的a标签,默认10个。
- @return type String
- echo Sr::page(100,3,10,'?article/list/{page}',array(3,4,5,1,2,6));
func (*Misc) RandString ¶
Click to show internal directories.
Click to hide internal directories.