mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-03 10:37:46 +00:00
Move string type to runtime in separate file
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package runtime
|
||||
|
||||
// This file implements functions related to Go strings.
|
||||
|
||||
type _string struct {
|
||||
length lenType
|
||||
ptr *uint8
|
||||
}
|
||||
|
||||
func stringEqual(x, y string) bool {
|
||||
if len(x) != len(y) {
|
||||
return false
|
||||
}
|
||||
for i := 0; i < len(x); i++ {
|
||||
if x[i] != y[i] {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
Reference in New Issue
Block a user