mirror of
https://github.com/github/codeql.git
synced 2025-12-17 09:13:20 +01:00
11 lines
169 B
Go
11 lines
169 B
Go
package main
|
|
|
|
func isPrefixOf(xs, ys []int) bool {
|
|
for i := 0; i < len(xs); i++ {
|
|
if len(ys) == 0 || xs[i] != ys[i] { // NOT OK
|
|
return false
|
|
}
|
|
}
|
|
return true
|
|
}
|