MCPcopy Create free account
hub / github.com/SmolDapp/tokenAssets / EndsWithSubstring

Function EndsWithSubstring

_config/goAPI/helpers.go:6–13  ·  view source on GitHub ↗

EndsWithSubstring returns true if value exists in arr

(arr []string, value string)

Source from the content-addressed store, hash-verified

4
5// EndsWithSubstring returns true if value exists in arr
6func EndsWithSubstring(arr []string, value string) bool {
7 for _, v := range arr {
8 if strings.HasSuffix(value, v) {
9 return true
10 }
11 }
12 return false
13}
14
15// ContainsSubString returns true if value exists in arr
16// arr are assumed to contain the substrings of value

Callers 1

NewRateLimiterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected