MCPcopy Create free account
hub / github.com/cogentcore/core / FindString

Function FindString

vgpu/gpu.go:150–157  ·  view source on GitHub ↗

FindString returns index of string if in list, else -1

(str string, strs []string)

Source from the content-addressed store, hash-verified

148
149// FindString returns index of string if in list, else -1
150func FindString(str string, strs []string) int {
151 for i, s := range strs {
152 if str == s {
153 return i
154 }
155 }
156 return -1
157}
158
159// AddInstanceExt adds given extension(s), only if not already set
160// returns true if added.

Callers 3

AddInstanceExtMethod · 0.85
AddDeviceExtMethod · 0.85
AddValidationLayerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected