shithub: mc

Download patch

ref: 0f945628a2af04425ddfd3117b890c6168eeb381
parent: 595f94567824d5c4d1e4ef75ed825eccc6b1783c
author: Ori Bernstein <ori@eigenstate.org>
date: Sun Jun 19 16:02:42 EDT 2016

Add isascii prediate.

--- a/lib/std/chartype.myr
+++ b/lib/std/chartype.myr
@@ -18,6 +18,7 @@
 	const islower	: (c : char -> bool)
 	const isupper	: (c : char -> bool)
 	const istitle	: (c : char -> bool)
+	const isascii	: (c : char -> bool)
 
 	/* transforms */
 	const tolower	: (c : char -> char)
@@ -1181,6 +1182,10 @@
 
 const istitle = {c
 	-> isupper(c) && islower(c)
+}
+
+const isascii = {c
+	-> c < 0x80
 }
 
 const tolower = {c