shithub: mc

Download patch

ref: f47233878dc144452dfca022313107c507b685b8
parent: 6e418753ce132f10cb25e2cd4679159c50fba931
author: Ori Bernstein <[email protected]>
date: Thu Jan 2 05:52:19 EST 2014

Add missing file.

    Forgot to add 'hasprefix.myr'. Fix.

--- /dev/null
+++ b/libstd/hasprefix.myr
@@ -1,0 +1,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
+       ;;
+}
+