MCPcopy Create free account
hub / github.com/vale-cli/vale / StringInSlice

Function StringInSlice

internal/core/util.go:174–181  ·  view source on GitHub ↗

StringInSlice determines if `slice` contains the string `a`.

(a string, slice []string)

Source from the content-addressed store, hash-verified

172
173// StringInSlice determines if `slice` contains the string `a`.
174func StringInSlice(a string, slice []string) bool {
175 for _, b := range slice {
176 if a == b {
177 return true
178 }
179 }
180 return false
181}
182
183// IntInSlice determines if `slice` contains the int `a`.
184func IntInSlice(a int, slice []int) bool {

Callers 15

shouldRunMethod · 0.92
lintHTMLTokensMethod · 0.92
lintScopeMethod · 0.92
lintTagsMethod · 0.92
checkClassesFunction · 0.92
cleanFunction · 0.92
lintCodeMethod · 0.92
lintCodeOldMethod · 0.92
replaceToksMethod · 0.92
RunMethod · 0.92
validateDefinitionFunction · 0.92
checkScopesFunction · 0.92

Calls

no outgoing calls

Tested by 2

TestLocalCompleteFunction · 0.74
TestLocalOnlyStylesFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…