MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / hash64

Method hash64

core/string/ustring.cpp:2804–2817  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2802}
2803
2804uint64_t String::hash64() const {
2805 /* simple djb2 hashing */
2806
2807 const char32_t *chr = get_data();
2808 uint64_t hashv = 5381;
2809 uint64_t c = *chr++;
2810
2811 while (c) {
2812 hashv = ((hashv << 5) + hashv) + c; /* hash * 33 + c */
2813 c = *chr++;
2814 }
2815
2816 return hashv;
2817}
2818
2819String String::md5_text() const {
2820 CharString cs = utf8();

Callers 10

generate_unique_idMethod · 0.80
create_id_for_pathMethod · 0.80
convertMethod · 0.80
importMethod · 0.80
convert_path_to_uidFunction · 0.80
export_project_filesMethod · 0.80
test_string.hFile · 0.80
process_includeMethod · 0.80
preprocessMethod · 0.80

Calls 1

get_dataFunction · 0.85

Tested by

no test coverage detected