diff lib/js/urweb.js @ 2045:534577e429e1

Added javascript for Basis.strsindex
author Samuel Dukhovni <dukhovni@mit.edu>
date Mon, 28 Jul 2014 20:18:43 -0400
parents 2b2d07946e65
children 7c2229aa22fc
line wrap: on
line diff
--- a/lib/js/urweb.js	Tue Jul 29 14:46:06 2014 -0400
+++ b/lib/js/urweb.js	Mon Jul 28 20:18:43 2014 -0400
@@ -1212,6 +1212,13 @@
     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)