/trunk/Functions.pas |
---|
22,6 → 22,7 |
function GetTempDir: string; |
function GetSpecialFolder(const aCSIDL: Integer): string; |
function GetMyDocumentsFolder: string; |
function StrHash(const st:string): cardinal; |
implementation |
326,4 → 327,14 |
Result := GetSpecialFolder(CSIDL_PERSONAL); |
end; |
function StrHash(const st:string): cardinal; |
var |
i:integer; |
begin |
// https://stackoverflow.com/a/41400477/488539 |
result := 0; |
for i := 1 to length(st) do |
result := result*$20844 xor byte(st[i]); |
end; |
end. |