• Welcome to the Kancolle Wiki!
  • If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord

Changes

Jump to navigation Jump to search
no edit summary
Line 23: Line 23:  
local hash = 0
 
local hash = 0
 
for i = 1, #string do
 
for i = 1, #string do
local letter = str:sub(i,i)
+
local letter = string:sub(i,i)
hash = bit32.lshift(hash,1)
+
hash = bit32.lshift(hash,3)
 
hash = hash+string.byte(letter) % (2^31-1)
 
hash = hash+string.byte(letter) % (2^31-1)
 
end
 
end
 +
return hash
 
end
 
end
  
2,922

edits

Navigation menu