mirror of https://github.com/tinygo-org/tinygo.git
BCG
5 years ago
committed by
Ron Evans
1 changed files with 11 additions and 0 deletions
@ -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 |
|||
} |
Loading…
Reference in new issue