Mercurial > urweb
comparison 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 |
comparison
equal
deleted
inserted
replaced
2188:61866c765485 | 2189:43393a4a66ce |
---|---|
1471 whine("Can't unmarshal list (" + tok + ")"); | 1471 whine("Can't unmarshal list (" + tok + ")"); |
1472 } | 1472 } |
1473 | 1473 |
1474 function strcmp(str1, str2) { | 1474 function strcmp(str1, str2) { |
1475 return ((str1 == str2) ? 0 : ((str1 > str2) ? 1 : -1)); | 1475 return ((str1 == str2) ? 0 : ((str1 > str2) ? 1 : -1)); |
1476 } | |
1477 | |
1478 function chr(n) { | |
1479 return String.fromCharCode(n); | |
1480 } | |
1481 | |
1482 function htmlifySpecialChar(ch) { | |
1483 return "&#" + ch.charCodeAt(0) + ";"; | |
1476 } | 1484 } |
1477 | 1485 |
1478 | 1486 |
1479 // Remote calls | 1487 // Remote calls |
1480 | 1488 |