function stringToHash(str) {
    var hash = 0;
    if (str.length === 0) {
        return hash;
    }
    var char;
    for (var i = 0; i < str.length; i++) {
        char = str.charCodeAt(i);
        // tslint:disable-next-line: no-bitwise
        hash = (hash << 5) - hash + char;
        // tslint:disable-next-line: no-bitwise
        hash = hash & hash;
    }
    return hash;
}
/**
 * Converts a string to 32bit integer
 */
Converts a string to 32bit integer
Converts a string to 32bit integer
function stringToHash(str) {
    var hash = 0;
    if (str.length === 0) {
        return hash;
    }
    var char;
    for (var i = 0; i < str.length; i++) {
        char = str.charCodeAt(i);
        hash = (hash << 5) - hash + char;
        hash = hash & hash;
    }
    return hash;
}
function stringToHash ( str ) { var hash = 0 ; if ( str . length === 0 ) { return hash ; } var char ; for ( var i = 0 ; i < str . length ; i ++ ) { char = str . charCodeAt ( i ) ; hash = ( hash << 5 ) - hash + char ; hash = hash & hash ; } return hash ; }
Converts a string to 32bit integer
Converts a string to 32bit integer
// tslint:disable-next-line: no-bitwise // tslint:disable-next-line: no-bitwise