MCPcopy Create free account
hub / github.com/andybalholm/cascadia / attributeSuffixSelector

Function attributeSuffixSelector

selector.go:240–248  ·  view source on GitHub ↗

attributeSuffixSelector returns a Selector that matches elements where the attribute named key ends with val.

(key, val string)

Source from the content-addressed store, hash-verified

238// attributeSuffixSelector returns a Selector that matches elements where
239// the attribute named key ends with val.
240func attributeSuffixSelector(key, val string) Selector {
241 return attributeSelector(key,
242 func(s string) bool {
243 if strings.TrimSpace(s) == "" {
244 return false
245 }
246 return strings.HasSuffix(s, val)
247 })
248}
249
250// attributeSubstringSelector returns a Selector that matches nodes where
251// the attribute named key contains val.

Callers 1

Calls 1

attributeSelectorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…