mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-17 03:03:27 +00:00
Added indexBytePortal from standard library to link as implementation for internal/bytealg.IndexByte
This commit is contained in:
@@ -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
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user