String.prototype.HashFAQ6 = function()
{
var hash = 0;
for (var i=0; i < this.length; i++)
{
hash += this.charCodeAt(i);
hash += (hash << 10);
hash ^= (hash >> 6);
}
hash += (hash << 3);
hash ^= (hash >> 11);
hash += (hash << 15);
return hash;
}
$('.result').text('hello world'.HashFAQ6());