Documentation
¶
Index ¶
- func Contains(s string, ss []string, caseSensitive bool) bool
- func ContainsChinese(str string) bool
- func EndsWith(s string, ss []string, caseSensitive bool) bool
- func HexToByte(hex string) []byte
- func IsBlank(s string) bool
- func IsEmpty(s string) bool
- func Len(s string) int
- func LowerFirst(s string) string
- func QuoteMeta(s string) string
- func RemoveEmoji(str string, trim bool) string
- func RemoveExtraSpace(s string) string
- func SequentialWordFields(s string, n int, separators ...string) []string
- func Split(str string, separators ...string) []string
- func StartsWith(s string, ss []string, caseSensitive bool) bool
- func String(value interface{}) string
- func ToBytes(s string) []byte
- func ToNarrow(str string) string
- func ToNumber(s string) int
- func ToWiden(str string) string
- func TrimAny(s string, sets ...string) string
- func UpperFirst(s string) string
- func WordMatched(s string, words []string, caseSensitive bool) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsChinese ¶
func SequentialWordFields ¶
SequentialWordFields 将 s 字符串根据指定的分隔符分隔为 1 - n 个连续单词组合的词组 单词前后的非字母和数字将会移除掉(比如 help? 将会变成 help),单词中间的则不会处理(a?b 包含在单词中间的 ? 不会处理)
stringx.SequentialWordFields("this is a string, are you sure?", 1, ",") => ["this", "is", "a", "string", "are", "you", "sure"] stringx.SequentialWordFields("this is a string, are you sure?", 2, ",") => ["this", "is", "a", "string", "are", "you", "sure", "this is", "is a", "a string", "are you", "you sure"]
func ToNumber ¶
ToNumber 字符串转换为唯一数字 https://stackoverflow.com/questions/5459436/how-can-i-generate-a-unique-int-from-a-unique-string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.