Documentation ¶
Index ¶
- Variables
- func FormatAlpha(val float32) uint8
- func HexToRgb(hex string) (int64, int64, int64)
- func InArrayWithStr(items []string, s string) bool
- func IsChineseChar(str string) bool
- func LenChineseChar(str string) int
- func ParseHexColor(s string) (c color.RGBA, err error)
- func PathExists(path string) (bool, error)
- func RandIndex(length int) int
- func RgbToHex(red int64, green int64, blue int64) string
Constants ¶
This section is empty.
Variables ¶
View Source
var ColorHexFormatErr = errors.New("hex color must start with '#'")
View Source
var ColorInvalidErr = errors.New("hexToByte component invalid")
Functions ¶
func InArrayWithStr ¶
InArrayWithStr is the verification whether it is in the array
func IsChineseChar ¶
IsChineseChar is to detect whether it is Chinese
func LenChineseChar ¶
LenChineseChar is to calc Chinese and letter length
func ParseHexColor ¶
ParseHexColor is to turn the hex color to RGB color
func PathExists ¶
PathExists is to detect whether the file exists
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.