Welcome to mirror list, hosted at ThFree Co, Russian Federation.

stringUtil.go « common « util - github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5f1f93fd4b5d491fe4082664eb98b2cfe7f3678b (plain)
1
2
3
4
5
6
7
8
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
}