Does the engine provide hash function?

Hi All

Does the engine provide something like boost::hash(string)? I’m looking, ideally, for something that would produce a unique number per string (assuming different strings).

Thanks!

uint32 GetTypeHash(const YourType& TypeVar)

1 Like

Did you get Karma for answering your own question? Also, that isn’t a hashing function, it is the function used by things like TSet in order to get and compare the Hashes.

Down voted, you cheater.

1 Like

I would suggest looking at something like this. I don’t believe the Engine comes with a hashing function. At least, I can’t find one easily.

https://www.cs.hmc.edu/~geoff/classes/hmc.cs070.200101/homework10/hashfuncs.html

Well that’s interesting. If it isn’t hashing it, what’s it doing? I was assuming that its taking the string of the name and hashing it. If it isn’t doing that, what is it doing?

Btw, I dont think you get karma for answering your own question, its just done in order to try and arrive at an answer if it isn’t documented. And for others. The idea that anyone who uses UE4 on a daily basis would do something for “karma” is a little bonkers, frankly.