Documentation ¶
Index ¶
- func AcciiToStr(s int) string
- func Count(s string, c byte) int
- func CutEndString(s string, c rune) string
- func CutStartString(s string, c rune) string
- func FirstLow(s string) string
- func FirstUp(s string) string
- func Has(s string, c byte) bool
- func IsNumber(s string) bool
- func IsPrefix(s string, prefix string) bool
- func IsSuffix(s string, suffix string) bool
- func Rand(l int) string
- func RandFor(l int, seed int64) string
- func RandInt(l int) string
- func RandStrArr(l int, n int) []string
- func ReplaceCharAfterSpecifiedCharLow(s, c string) (out string)
- func ReplaceCharAfterSpecifiedCharUp(s, c string) (out string)
- func ToAccii(s string) int
- func UniqueFileName(f *multipart.FileHeader) string
- type SafeRand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CutEndString ¶ added in v0.0.17
CutEndString 截取字符串中最后一个字符之后的字符串 例如:CutEndString("abc/def/ghi", '/') => "ghi"
func CutStartString ¶ added in v0.0.17
CutStartString 截取字符串中最后一个字符之前的字符串 例如:CutStartString("abc/def/ghi", '/') => "abc/def/"
func RandStrArr ¶ added in v0.5.11
RandStrArr 生成随机字符串数组 @param l 长度 @param n 数量
func ReplaceCharAfterSpecifiedCharLow ¶ added in v0.0.18
ReplaceCharAfterSpecifiedCharLow 替换指定字符后面的字符为小驼峰 例如:ReplaceCharAfterSpecifiedCharLow("abc/def/ghi", '/') => "abcDefGhi"
func ReplaceCharAfterSpecifiedCharUp ¶ added in v0.0.18
ReplaceCharAfterSpecifiedCharUp 替换指定字符后面的字符为大驼峰 例如:ReplaceCharAfterSpecifiedCharUp("abc/def/ghi", '/') => "AbcDefGhi"
func UniqueFileName ¶ added in v0.6.2
func UniqueFileName(f *multipart.FileHeader) string
UniqueFileName 生成唯一文件名
Types ¶
Click to show internal directories.
Click to hide internal directories.