diff lib/js/urweb.js @ 2189:43393a4a66ce

JavaScript versions of a few more functions
author Adam Chlipala <adam@chlipala.net>
date Sun, 01 Nov 2015 14:17:09 -0500
parents 61866c765485
children fc1c89627178
line wrap: on
line diff
--- a/lib/js/urweb.js	Sun Nov 01 12:23:44 2015 -0500
+++ b/lib/js/urweb.js	Sun Nov 01 14:17:09 2015 -0500
@@ -1475,6 +1475,14 @@
     return ((str1 == str2) ? 0 : ((str1 > str2) ? 1 : -1));
 }
 
+function chr(n) {
+    return String.fromCharCode(n);
+}
+
+function htmlifySpecialChar(ch) {
+    return "&#" + ch.charCodeAt(0) + ";";
+}
+
 
 // Remote calls