mirror of
https://github.com/alireza0/x-ui.git
synced 2026-03-18 23:05:48 +00:00
Update Tg bot related function
This commit is contained in:
9
util/common/stringUtil.go
Normal file
9
util/common/stringUtil.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package common
|
||||
|
||||
import "sort"
|
||||
|
||||
func IsSubString(target string, str_array []string) bool {
|
||||
sort.Strings(str_array)
|
||||
index := sort.SearchStrings(str_array, target)
|
||||
return index < len(str_array) && str_array[index] == target
|
||||
}
|
||||
Reference in New Issue
Block a user