blob: c9749f604c2b1e57311b2f27fda73c80328a4fad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
use "cmp.use"
pkg std =
const hasprefix : (s : byte[:], pre : byte[:] -> bool)
;;
const hasprefix = {s, pre
match strncmp(s, pre, pre.len)
| `Equal: -> true
| _: -> false
;;
}
|