stringutils

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MulanPSL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Any2Str

func Any2Str(v interface{}) string

func Bool2Str

func Bool2Str(b bool) string

func BoolPtr2Str

func BoolPtr2Str(b *bool) string

func Camel2Case

func Camel2Case(name string) string

func Capitalize

func Capitalize(str string) string

func Case2Camel

func Case2Camel(name string) string

下划线写法转为驼峰写法

func CheckQueryParamUsing

func CheckQueryParamUsing(param *interface{}) (ok bool)

func Int64ToLocalDateInt

func Int64ToLocalDateInt(sec int64) basemodel.LocalDateInt

func Int64ToLocalDateIntPtr

func Int64ToLocalDateIntPtr(sec int64) *basemodel.LocalDateInt

func Int64ToLocalTimeInt

func Int64ToLocalTimeInt(sec int64) basemodel.LocalTimeInt

func Int64ToLocalTimeIntPtr

func Int64ToLocalTimeIntPtr(sec int64) *basemodel.LocalTimeInt

func Int64ToLocalTimeIntUtcPtr

func Int64ToLocalTimeIntUtcPtr(sec int64) *basemodel.LocalTimeUTCInt

func Int64ToLocalTimeUtcInt

func Int64ToLocalTimeUtcInt(sec int64) basemodel.LocalTimeUTCInt

func Inttime2Str

func Inttime2Str(timestamp int64) string

func Ip4

func Ip4() string

LocalTimeInt

func Lcfirst

func Lcfirst(str string) string

首字母小写

func List2string

func List2string(lst *list.List) string

func List2stringBy

func List2stringBy(lst *list.List, sep string) string

func LogList

func LogList(lst *list.List)

func NameOfType

func NameOfType(v interface{}) string

func ParseTemplateString

func ParseTemplateString(str string, vars interface{}) string

func PrintList

func PrintList(lst *list.List)

func RandomString

func RandomString(n int) string

func Str2BoolPtr

func Str2BoolPtr(s string) *bool

func Str2Float64

func Str2Float64(in string) float64

func Str2Int64

func Str2Int64(in string) int64

timeNow := tNow.Format("2006-01-02 15:04:05")

func Strtime2Int

func Strtime2Int(datetime string) (timestamp int64)

func Strtime2Time

func Strtime2Time(datetime string) time.Time

func ToStringWith

func ToStringWith(in interface{}) (str string)

func Ucfirst

func Ucfirst(str string) string

首字母大写

func UcfirstCase2Camel

func UcfirstCase2Camel(str string) string

func UnzipStr

func UnzipStr(zipContent string) (originInfo []byte)

func ZipStr

func ZipStr(origin string) (content string)

Types

type Buffer

type Buffer struct {
	*bytes.Buffer
}

内嵌bytes.Buffer,支持连写

func NewBuffer

func NewBuffer() *Buffer

func (*Buffer) Append

func (b *Buffer) Append(i interface{}) *Buffer

type UnixTime

type UnixTime time.Time

func (UnixTime) MarshalJSON

func (t UnixTime) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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