MCPcopy
hub / github.com/dgraph-io/dgraph / HasString

Function HasString

x/x.go:674–681  ·  view source on GitHub ↗

HasString returns whether the slice contains the given string.

(a []string, b string)

Source from the content-addressed store, hash-verified

672
673// HasString returns whether the slice contains the given string.
674func HasString(a []string, b string) bool {
675 for _, k := range a {
676 if k == b {
677 return true
678 }
679 }
680 return false
681}
682
683// Unique takes an array and returns it with no duplicate entries.
684func Unique(a []string) []string {

Callers 7

cantCoerceScalarFunction · 0.92
rewriteAndExecuteMethod · 0.92
IncludeAbstractFieldMethod · 0.92
coerceScalarFunction · 0.92
genDgSchemaFunction · 0.92
filterCheckFunction · 0.92
addHashIfRequiredFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected