Rev 61 | Rev 71 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 61 | Rev 67 | ||
---|---|---|---|
Line 20... | Line 20... | ||
20 | function FileSystemCaseSensitive: boolean; |
20 | function FileSystemCaseSensitive: boolean; |
21 | function HighColorWindows: boolean; |
21 | function HighColorWindows: boolean; |
22 | function GetTempDir: string; |
22 | function GetTempDir: string; |
23 | function GetSpecialFolder(const aCSIDL: Integer): string; |
23 | function GetSpecialFolder(const aCSIDL: Integer): string; |
24 | function GetMyDocumentsFolder: string; |
24 | function GetMyDocumentsFolder: string; |
- | 25 | function StrHash(const st:string): cardinal; |
|
25 | 26 | ||
26 | implementation |
27 | implementation |
27 | 28 | ||
28 | uses |
29 | uses |
29 | ShlObj; // Needed for the CSIDL constants |
30 | ShlObj; // Needed for the CSIDL constants |
Line 324... | Line 325... | ||
324 | function GetMyDocumentsFolder: string; |
325 | function GetMyDocumentsFolder: string; |
325 | begin |
326 | begin |
326 | Result := GetSpecialFolder(CSIDL_PERSONAL); |
327 | Result := GetSpecialFolder(CSIDL_PERSONAL); |
327 | end; |
328 | end; |
328 | 329 | ||
- | 330 | function StrHash(const st:string): cardinal; |
|
- | 331 | var |
|
- | 332 | i:integer; |
|
- | 333 | begin |
|
- | 334 | // https://stackoverflow.com/a/41400477/488539 |
|
- | 335 | result := 0; |
|
- | 336 | for i := 1 to length(st) do |
|
- | 337 | result := result*$20844 xor byte(st[i]); |
|
- | 338 | end; |
|
- | 339 | ||
329 | end. |
340 | end. |