dist/simple-crypt-deps.js
function(s1, s2) {
    var n = s1.length;
    if (s1.length > s2.length) n = s2.length;
    for (var i = 0; i < n; i++) {
	if (s1.charCodeAt(i) != s2.charCodeAt(i)) return i;
    }
    if (s1.length != s2.length) return n;
    return -1; // same
}
function(s1, s2) {
    var n = s1.length;
    if (s1.length > s2.length) n = s2.length;
    for (var i = 0; i < n; i++) {
	if (s1.charCodeAt(i) != s2.charCodeAt(i)) return i;
    }
    if (s1.length != s2.length) return n;
    return -1; // same
}
function ( s1 , s2 ) { var n = s1 . length ; if ( s1 . length > s2 . length ) n = s2 . length ; for ( var i = 0 ; i < n ; i ++ ) { if ( s1 . charCodeAt ( i ) != s2 . charCodeAt ( i ) ) return i ; } if ( s1 . length != s2 . length ) return n ; return - 1 ; // same }
find index of string where two string differs
@name strdiffidx
@function
@param {String} s1 string to compare
@param {String} s2 string to compare
@return {Number} string index of where character differs. Return -1 if same.
@since jsrsasign 4.9.0 base64x 1.1.5
@example
strdiffidx("abcdefg", "abcd4fg") -> 4
strdiffidx("abcdefg", "abcdefg") -> -1
strdiffidx("abcdefg", "abcdef") -> 6
strdiffidx("abcdefgh", "abcdef") -> 6
find index of string where two string differs