Update Tg bot related function

This commit is contained in:
FranzKafkayu
2022-04-17 11:21:45 +08:00
parent 8791c8729c
commit 72e206879a
27 changed files with 533 additions and 56 deletions

View 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
}