Added indexBytePortal from standard library to link as implementation for internal/bytealg.IndexByte

This commit is contained in:
BCG
2020-01-23 00:06:34 -05:00
committed by Ron Evans
parent 519adf3aef
commit eb9c2c276e
+11
View File
@@ -0,0 +1,11 @@
package runtime
//go:linkname indexBytePortable internal/bytealg.IndexByte
func indexBytePortable(s []byte, c byte) int {
for i, b := range s {
if b == c {
return i
}
}
return -1
}