Mercurial > urweb
diff lib/js/urweb.js @ 828:14a6c0971d89
String.length
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 30 May 2009 09:59:10 -0400 |
parents | be0988e46336 |
children | 20fe00fd81da |
line wrap: on
line diff
--- a/lib/js/urweb.js Thu May 28 13:47:05 2009 -0400 +++ b/lib/js/urweb.js Sat May 30 09:59:10 2009 -0400 @@ -237,7 +237,6 @@ x.innerHTML = html; addNode(x); runScripts(x); - alert("HTML:\n" + html); } var thisScript = null; @@ -351,8 +350,9 @@ function ts(x) { return x.toString() } function bs(b) { return (b ? "True" : "False") } -function sub(x, i) { return x[i]; } -function suf(x, i) { return x.substring(i); } +function sub(s, i) { return s[i]; } +function suf(s, i) { return s.substring(i); } +function slen(s) { return s.length; } function pi(s) { var r = parseInt(s);