2 * Copyright 2002-2013, Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * Copyright 2001, Travis Geiselbrecht. All rights reserved.
6 * Distributed under the terms of the NewOS License.
10 #include <util/StringHash.h>
14 hash_hash_string(const char* string
)
19 // we assume hash to be at least 32 bits
20 while ((c
= *string
++) != 0) {
31 hash_hash_string_part(const char* string
, size_t maxLength
)
36 // we assume hash to be at least 32 bits
37 while (maxLength
-- > 0 && (c
= *string
++) != 0) {