summaryrefslogtreecommitdiff
path: root/lib/js
diff options
context:
space:
mode:
authorGravatar Samuel Dukhovni <dukhovni@mit.edu>2014-07-28 20:18:43 -0400
committerGravatar Samuel Dukhovni <dukhovni@mit.edu>2014-07-28 20:18:43 -0400
commit08bbe52588b9d195295f1b5aca14c88a9ae3ea3c (patch)
tree77854e5304e14bc9e719dcbfb05a3726cde5b58a /lib/js
parentc771a68c26e952531aca922c0837d961991bd3bc (diff)
Added javascript for Basis.strsindex
Diffstat (limited to 'lib/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 c3cab50a..76a900f7 100644
--- a/lib/js/urweb.js
+++ b/lib/js/urweb.js
@@ -1212,6 +1212,13 @@ function sidx(s, ch) {
else
return r;
}
+function ssidx(h, n) {
+ var r = h.indexOf(n);
+ if (r == -1)
+ return null;
+ else
+ return r;
+}
function sspn(s, chs) {
for (var i = 0; i < s.length; ++i)
if (chs.indexOf(s.charAt(i)) != -1)