str

package
v0.0.0-...-b1f09d4 Latest Latest
Warning

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

Go to latest
Published: May 22, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SALT = "$^*#,.><)(_+f*m"
)

Variables

View Source
var LintGonicMapper = GonicMapper{
	"API":   true,
	"ASCII": true,
	"CPU":   true,
	"CSS":   true,
	"DNS":   true,
	"EOF":   true,
	"GUID":  true,
	"HTML":  true,
	"HTTP":  true,
	"HTTPS": true,
	"ID":    true,
	"IP":    true,
	"JSON":  true,
	"LHS":   true,
	"QPS":   true,
	"RAM":   true,
	"RHS":   true,
	"RPC":   true,
	"SLA":   true,
	"SMTP":  true,
	"SSH":   true,
	"TLS":   true,
	"TTL":   true,
	"UI":    true,
	"UID":   true,
	"UUID":  true,
	"URI":   true,
	"URL":   true,
	"UTF8":  true,
	"VM":    true,
	"XML":   true,
	"XSRF":  true,
	"XSS":   true,
}

Functions

func BigCamelCase

func BigCamelCase(str string) string

*

  大驼峰命名
* 字符串首字母转化为大写 ios_bbbbbbbb -> IosBbbbbbbbb

func FirstToUpper

func FirstToUpper(str string) string

*

	小驼峰命名
 * 字符串首字母转化为大写 ios_bbbbbbbb -> iosBbbbbbbbb

func GetRand

func GetRand() *rand.Rand

randseed

func GetRandomString

func GetRandomString(l int) string

生成 数字和小写字母 https://blog.csdn.net/qq948993066/article/details/77368971

func GetRandomString2

func GetRandomString2(l int) string

生成随机字符串

func LittleCamelCase

func LittleCamelCase(str string) string

*

   小驼峰命名
* 字符串首字母转化为大写 ios_bbbbbbbb -> iosBbbbbbbbb

func MakeYearDaysRand

func MakeYearDaysRand(sum int) string

生成单号 06123xxxxx sum 最少10

func RandSalt

func RandSalt() string

rand salt

func Substr

func Substr(str string, start int, length int) string

https://studygolang.com/articles/4287 截取字符串 start 起点下标 length 需要截取的长度

func Substr2

func Substr2(str string, start int, end int) string

截取字符串 start 起点下标 end 终点下标(不包括)

Types

type GonicMapper

type GonicMapper map[string]bool

GonicMapper implements IMapper. It will consider initialisms when mapping names. E.g. id -> ID, user -> Admin and to table names: UserID -> user_id, MyUID -> my_uid

func (GonicMapper) Obj2Table

func (mapper GonicMapper) Obj2Table(name string) string

func (GonicMapper) Table2Obj

func (mapper GonicMapper) Table2Obj(name string) string

大驼峰命名

Jump to

Keyboard shortcuts

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