Documentation ¶
Overview ¶
常用工具类
Index ¶
- func Array_diff(arr1 interface{}, arrs ...interface{}) (interface{}, error)
- func Array_pop(arr interface{}) interface{}
- func Array_push(arr interface{}, elem ...interface{})
- func Array_shift(arr interface{}) interface{}
- func Array_slice(arr interface{}, n ...int) interface{}
- func Array_splice(arr interface{}, offset int, length int, replacement ...interface{}) interface{}
- func Array_unshift(arr interface{}, elem ...interface{})
- func Base64_decode(str string) string
- func Base64_encode(str string) string
- func Chmod(path string, mode os.FileMode) error
- func Chr(i int) string
- func Copy(src, dst string) (int64, error)
- func Date(format string, durations ...interface{}) string
- func Fclose(f *os.File) (bool, error)
- func File_exists(path string) bool
- func File_get_contents(fileName string, skipVerify ...bool) (string, error)
- func File_put_contents(fileName string, content string) error
- func Fopen(name string) (*os.File, error)
- func Fwrite(f *os.File, content string) (int, error)
- func Getkind(i interface{}) string
- func Gettype(i interface{}) string
- func In_array(need interface{}, arr interface{}) bool
- func Is_dir(path string) bool
- func Is_file(path string) bool
- func Join(strs []string, sep string) string
- func Json_decode(str string, out interface{}) error
- func Json_encode(in interface{}) (string, error)
- func Ltrim(str string, sep string) string
- func Mb_strlen(str string) int
- func Mb_substr(str string, start int, length ...int) string
- func Md5(str string) string
- func Md5_file(filename string, raw ...bool) (string, error)
- func Mkdir(dir string, mode os.FileMode, recursive ...bool) (bool, error)
- func Mt_rand(min, max int64) int64
- func Ord(str string) int
- func Password_hash(password string) (string, error)
- func Password_verify(password string, hash string) bool
- func ReadFile(name string) (string, error)
- func Rename(oldname, newname string) (bool, error)
- func Rmdir(path string) error
- func Rtrim(str string, sep string) string
- func Sha1(str string) string
- func Split(str string, sep string) []string
- func Str_replace(old string, new string, str string) string
- func Str_split(str string, n ...int) []string
- func Strcasecmp(str, str2 string) bool
- func Strcmp(str, str2 string) bool
- func Strip_tags(str string) string
- func Strlen(str string) int
- func Strpos(str string, substr string) int
- func Strrev(str string) string
- func Strrpos(str string, substr string) int
- func Strstr(str string, sep string) string
- func Strtolower(str string) string
- func Strtotime(str string, loc ...string) int64
- func Strtoupper(str string) string
- func Substr(str string, start int, length ...int) string
- func Time() int64
- func Trim(str string, sep string) string
- func Ucfirst(str string) string
- func Ucwords(str string) string
- func Unlink(name string) (bool, error)
- func Unset(arr interface{}, i int)
- func WriteAppendFile(fileName string, content string) error
- func WriteFile(path string, content string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Array_diff ¶
func Array_diff(arr1 interface{}, arrs ...interface{}) (interface{}, error)
数组差集 只支持 []int, []float32, []float64, []string, []byte
func Array_splice ¶
去掉数组中的某一部分并用其它值取代
func File_get_contents ¶ added in v0.1.9
file_get_contents
func File_put_contents ¶ added in v0.1.9
file_put_contents
func Password_hash ¶ added in v0.1.9
func Password_verify ¶ added in v0.1.9
func WriteAppendFile ¶ added in v0.1.9
追加写入
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.