Documentation
¶
Index ¶
- Constants
- func Between(s, from, to string) string
- func Contains(obj interface{}, v ...interface{}) bool
- func DeepContains(obj interface{}, v ...interface{}) bool
- func Download(url string, dest string) (err error)
- func Index(s, substr string) int
- func IsBlank(s string) bool
- func IsDir(path string) bool
- func IsEmpty(s string) bool
- func IsExist(path string) bool
- func IsFile(path string) bool
- func IsNotBlank(s string) bool
- func IsNotEmpty(s string) bool
- func LeftPad(s string, padStr string, length int) string
- func Len(s string) int
- func RightPad(s string, padStr string, length int) string
- func ToInt(s string) int
- func ToIntDv(s string, dv int) int
- func Trim(str string) string
- func TrimLeft(str string) string
- func TrimRight(str string) string
- func UUID() string
- func ZeroFill(s string, length int) string
Constants ¶
View Source
const EmptyStr = ""
EmptyStr is the empty string const
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
func Contains(obj interface{}, v ...interface{}) bool
Contains tells an object is in a list or not
func DeepContains ¶
func DeepContains(obj interface{}, v ...interface{}) bool
DeepContains tells an object is in a list or not, but uses reflect.DeepEqual to determine the equality
func Index ¶
Index return the location of a string in another long string, if it doesn't exist, returns -1 this function supports CJK characters
func IsBlank ¶
IsBlank tells a string is blank or not, a string with all white blanks would be considered as true
func Len ¶
Len returns the length of a string using rune, it's useful when getting the length of a string including CJK characters
Types ¶
This section is empty.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.