string

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandString

func RandString(slen int) string

Types

type WString

type WString struct {
	Str interface{}
}

func (*WString) Length

func (str *WString) Length() int

*

  • 获取字符串的长度
  • @return int

func (*WString) Substr

func (str *WString) Substr(pos int, length int) string

*

  • 截取字符串
  • @param int pos 开始位置,如果是负数,从尾部开始截取,比如-2代表倒数第二个字符
  • @param int length 截取长度
  • @return string

func (*WString) ToFloat32

func (str *WString) ToFloat32() float32

func (*WString) ToFloat64

func (str *WString) ToFloat64() float64

func (*WString) ToInt

func (str *WString) ToInt() int

func (*WString) ToInt64

func (str *WString) ToInt64() int64

func (*WString) ToString

func (str *WString) ToString() string

*

  • 转换为字符串
  • @return string

Jump to

Keyboard shortcuts

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