diff options
author | Adam Chlipala <adam@chlipala.net> | 2015-11-01 14:17:09 -0500 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2015-11-01 14:17:09 -0500 |
commit | b16e75da8b5937914fb17852cd03127934bac08c (patch) | |
tree | e9c2974db38b597213aef421eb11de875b842eb0 /lib | |
parent | 808afe59b97b345f05d16d1a99bbd24c466c8cbf (diff) |
JavaScript versions of a few more functions
Diffstat (limited to 'lib')
-rw-r--r-- | lib/js/urweb.js | 8 |
1 files changed, 8 insertions, 0 deletions
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 |