estring

package
v0.0.0-...-212a885 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2024 License: GPL-3.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArrayIntToString

func ArrayIntToString(vals []int) []string

ArrayIntToString int 转为 string

func CompareNoCase

func CompareNoCase(s1, s2 string) bool

CompareNoCase 不区分大小写的字符串比较

func ComparePath

func ComparePath(s1, s2 string) bool

ComparePath 路径比较

func EncodeHexWithSpace

func EncodeHexWithSpace(dst, src []byte) int

EncodeHexWithSpace 代空格编码16进制

func EncodeHexWithSpaceLen

func EncodeHexWithSpaceLen(l int) int

EncodeHexWithSpaceLen 带空格编码16进制长度

func FindString

func FindString(line, key string) string

FindString 查找字符串

func FormatSize

func FormatSize(size int64) string

FormatSize 格式化大小

func GetCode

func GetCode(data []byte) (code string, offset int64)

GetCode 获取文字编码 默认 utf8编码

func GetFileCode

func GetFileCode(file multipart.File) (code string)

GetFileCode 获取文件 编码 返回空置认为是 utf8 编码

func GetIndex

func GetIndex(line string, key string) int

GetIndex 获取key在行中的索引号

func GetNameStruct

func GetNameStruct(class interface{}, isSnake ...bool) (title string)

GetNameStruct 获取类名

func GetStructValues

func GetStructValues(class interface{}) (values []interface{})

GetStructValues 获取字段对应的值

func GetTitlesFromStruct

func GetTitlesFromStruct(class interface{}) (titles []string)

GetTitlesFromStruct 获取类中的成员变量和变量对应的值

func IsAlpha

func IsAlpha(b byte) bool

IsAlpha 是否是字母

func IsCrLf

func IsCrLf(r rune) bool

IsCrLf 是否是回车换行

func IsDigit

func IsDigit(b byte) bool

IsDigit 是否是数字

func String

func String(data []byte) string

String 去掉为0之后的字符

func StringInArray

func StringInArray(str string, stringArray []string) bool

StringInArray 字符串是否在一个数组中

func ToString

func ToString(f float64) (s string)

ToString 格式化浮点数

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL