5 * Copyright (c) 2020 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
25 #include <dali/public-api/common/dali-common.h>
31 INITIAL_HASH_VALUE = 5381
35 * @brief Create a hash code for a string
36 * @param toHash string to hash
39 DALI_CORE_API std::size_t CalculateHash(const std::string& toHash);
42 * @brief Create a hash code for 2 strings combined.
43 * Allows a hash to be calculated without concatenating the strings and allocating any memory.
44 * @param string1 first string
45 * @param string2 second string
48 DALI_CORE_API std::size_t CalculateHash(const std::string& string1, const std::string& string2);
51 * @brief Create a hash code for a string
52 * @param toHash string to hash
53 * @param terminator character terminating the hashing
56 DALI_CORE_API std::size_t CalculateHash(const std::string& toHash, char terminator);