Documentation ¶
Index ¶
- Constants
- func InStringList(x string, lst []string) bool
- func IsDigit(s string) bool
- func IsSubsetList(lst1, lst2 []string, strict bool) bool
- func QuoteColumns(cols []string, sep string, quote func(string) string) string
- func ReduceSpaces(s string) string
- func RemoveSpaces(s string) string
- func ReplaceWith(s string, subs map[string]string) string
- func StartStringList(x string, lst []string) bool
- func StringMatch(a, b string, cmp int) bool
- func TruncateText(msg string, size int) string
- type Globs
- type Word
Constants ¶
View Source
const ( CmpStringOmit = iota // 不比较 CmpStringContains // 包含 CmpStringStartswith // 打头 CmpStringEndswith // 结尾 CmpStringIgnoreSpaces // 忽略空格 CmpStringCaseInsensitive // 不分大小写 CmpStringEqual // 相等 )
字符串比较方式
Variables ¶
This section is empty.
Functions ¶
func IsSubsetList ¶
IsSubsetList lst1 是否 lst2 的(真)子集
func QuoteColumns ¶
QuoteColumns 盲转义,认为字段名以小写字母开头
func ReplaceWith ¶
ReplaceWith 一一对应进行替换,次序不定(因为map的关系)
func StartStringList ¶
StartStringList 是否在字符串列表中,比较方式是有任何一个开头符合
Types ¶
Click to show internal directories.
Click to hide internal directories.