From 764c3b15d459a42ef6222a82f93a38937d2ac141 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sun, 1 Nov 2015 14:17:09 -0500 Subject: JavaScript versions of a few more functions --- lib/js/urweb.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/js/urweb.js') diff --git a/lib/js/urweb.js b/lib/js/urweb.js index 45ed6be8..6cf8a3f3 100644 --- a/lib/js/urweb.js +++ b/lib/js/urweb.js @@ -1475,6 +1475,14 @@ function strcmp(str1, str2) { return ((str1 == str2) ? 0 : ((str1 > str2) ? 1 : -1)); } +function chr(n) { + return String.fromCharCode(n); +} + +function htmlifySpecialChar(ch) { + return "&#" + ch.charCodeAt(0) + ";"; +} + // Remote calls -- cgit v1.2.3