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 '#'") ColorInvalidErr = errors.New("hexToByte component invalid") )
Functions ¶
func InArrayWithStr ¶
InArrayWithStr checks if a string is in an array
func IsChineseChar ¶
IsChineseChar checks if a string contains Chinese characters
func LenChineseChar ¶
LenChineseChar calculates the character length of a string (supports Chinese)
func ParseHexColor ¶
ParseHexColor converts a hex color to an RGBA color
func PathExists ¶
PathExists checks if a file path exists
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.