Categorygithub.com/masterZSH/helper
modulepackage
0.0.0-20240726061839-0abddf470cc4
Repository: https://github.com/masterzsh/helper.git
Documentation: pkg.go.dev

# README

helper

import "github.com/masterZSH/helper"
//  NilSliceToEmptySlice
helper.NilSliceToEmptySlice(yournilslice)

// slice to str  faster than string([]byte{})
helper.SliceByteToString([]byte[1,2,3])

//  str to slice  better that []byte("123")
helper.StringToSliceByte("123")


// is email 
helper.IsEmail("[email protected]")

// GetPhoneCipherText "13112312312" => "131****1234"
helper.GetPhoneCipherText("13112312312")

# Packages

No description provided by the author

# Functions

ByteCount converts bytes number to human readable byte string 1024 => 1KB 1100000 => 1.1MB.
No description provided by the author
No description provided by the author
No description provided by the author
GenerateCaptcha 生成数字验证码 GenerateCaptcha(4) => 1253 GenerateCaptcha(4) => 142536.
GetPhoneCipherText 加密手机号 "13112312312" => "131****1234".
IsChinese 是否是中文 包含简/繁体 扩大生僻字范围.
IsEmail 是否是邮箱.
IsPhoneNumber 是否是手机号.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

B 1B => 8bit.
EB 1EB => 1024PB.
GB 1GB => 1024MB.
KB 1KB => 1024B.
MB 1MB => 1024KB.
PB 1PB => 1024TB.
TB 1TB => 1024GB.

# Variables

No description provided by the author

# Type aliases

ByteSize byte size B,KB...