summaryrefslogtreecommitdiff
path: root/lib/js/urweb.js
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-05-31 12:41:34 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-05-31 12:41:34 -0400
commita6424094365f7d63b6c9dade8f8f72ef26e92b45 (patch)
tree4eac927486b596ee7118f84c2dc468489840e98d /lib/js/urweb.js
parentbd0d3db78996b00e153252f03b02551ac3fde4cf (diff)
strcspn and friends
Diffstat (limited to 'lib/js/urweb.js')
-rw-r--r--lib/js/urweb.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js
index be3d652a..0cc66bc7 100644
--- a/lib/js/urweb.js
+++ b/lib/js/urweb.js
@@ -360,6 +360,13 @@ function sidx(s, ch) {
else
return r;
}
+function sspn(s, chs) {
+ for (var i = 0; i < s.length; ++i)
+ if (chs.indexOf(s[i]) != -1)
+ return i;
+
+ return null;
+}
function schr(s, ch) {
var r = s.indexOf(ch);
if (r == -1)