What kind of hash function can give me a 32 bit value from a string?
I'm using the QT framework so if there is something like开发者_Python百科 this implemented in that, I would use it, but I couldn't find it.
I would like to get random color values for variable length strings.
If you include <QHash>
, then you get overloads of the function qHash()
, one of which is:
uint qHash(const QString & key)
精彩评论