Documentation ¶
Index ¶
- Variables
- func CamelCase(s string) string
- func Contains(list []string, str string) bool
- func ContainsIgnoreCase(list []string, str string) bool
- func Filter(s string, filter func(r rune) bool) string
- func HasEmpty(args ...string) bool
- func LowerCamelCase(s string) string
- func MustJsonString(obj interface{}) string
- func NewSimpleHashId(salt string, minLength int, alphabet ...string) *simpleHashId
- func NotEmpty(args ...string) bool
- func Remove(strings []string, strs ...string) []string
- func Reverse(s string) string
- func Substr(str string, start, stop int) (string, error)
- func TakeOne(valid, or string) string
- type Trie
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidStartPosition is an error that indicates the start position is invalid. ErrInvalidStartPosition = errors.New("start position is invalid") // ErrInvalidStopPosition is an error that indicates the stop position is invalid. ErrInvalidStopPosition = errors.New("stop position is invalid") )
Functions ¶
func ContainsIgnoreCase ¶ added in v1.0.17
ContainsIgnoreCase checks if str is in list (ignore case).
func LowerCamelCase ¶
LowerCamelCase to transform string to LowerCamelCase
func MustJsonString ¶ added in v1.0.22
func MustJsonString(obj interface{}) string
MustJsonString returns string from json.Marshal.
func NewSimpleHashId ¶
Types ¶
type Trie ¶ added in v1.0.15
type Trie interface { // Filter filter sentence get masked sentence and get keywords Filter(text string) (string, []string) // FindKeywords get sentence keywords FindKeywords(text string) []string // AddWord add keywords // Attention: NOT thread safe AddWords(text ...string) }
Trie interface
Click to show internal directories.
Click to hide internal directories.