Open main menu
Home
Random
Nearby
Log in
Settings
About Kancolle Wiki
Disclaimers
Kancolle Wiki
Search
Changes
← Older edit
Newer edit →
Module:RemiLib
(view source)
Revision as of 05:00, 25 October 2015
16 bytes added
,
9 years ago
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
Remi Scarlet
2,922
edits