Documentation ¶
Index ¶
- Constants
- func CutString(s string, runeIndex int, keepIndex bool) (string, string)
- func GetRuneCount(str string) int
- func HasSuffixAt(str string, prefix string, tOffset int) bool
- func IndexOfString(s string, char string) int
- func LastIndexOfString(s string, char string) int
- func PasswordCheck(pwd string, flag PasswdFlag, minLen int, maxLen int) bool
- func Print(args ...interface{}) string
- func PrintSafe(args ...interface{}) string
- func SplitToken(str string, separator string, trimTokens bool, ignoreEmptyTokens bool) []string
- func SubPrefix(s string, index int) string
- func SubStr(s string, startIndex, length int) string
- func SubString(s string, startIndex, endIndex int) string
- func SubSuffix(s string, index int) string
- type PasswdFlag
Constants ¶
View Source
const ( // LOrU // Uppercase or lowercase letter LOrU = L | U // DefaultPasswdFlag // Include Number and Letter DefaultPasswdFlag = N | LOrU )
Variables ¶
This section is empty.
Functions ¶
func LastIndexOfString ¶
LastIndexOfString 取单个字符的尾位置
func PasswordCheck ¶
func PasswordCheck(pwd string, flag PasswdFlag, minLen int, maxLen int) bool
func SplitToken ¶
Types ¶
type PasswdFlag ¶
type PasswdFlag int
const ( // N Numbers N PasswdFlag = 1 << iota // L Lowercase letters L // U Uppercase letter U // S Symbols found on the keyboard (all keyboard characters not defined as letters or numerals) and spaces S )
Click to show internal directories.
Click to hide internal directories.