#include <util.h>
List of all members.
Public Member Functions |
size_t | operator() (const string &s) const |
Detailed Description
Definition at line 35 of file util.h.
Member Function Documentation
size_t StringHash::operator() |
( |
const string & |
s | ) |
const [inline] |
Definition at line 36 of file util.h.
{
size_t hash_code = 0;
const char* str = s.c_str();
for (int ch = 0; str[ch] != 0; ++ch) {
hash_code += str[ch] << (ch % 24);
}
return hash_code;
}
The documentation for this struct was generated from the following file:
- /usr/local/google/home/jbreiden/tesseract-ocr-read-only/training/util.h