How can I convert a non-numeric String to an Integer?
I got for instance:
String unique = "FUBAR";
What's a good way to represent the String as an Integer with no collisions e.g. "FUBAR" should always be represented as the same number and shan't collide with any other String. For instance, String a = "A";
should be represented as the Integer 1
and so on, but what is a method that does this (preferrably for all unicode strings, but in my case ASCII values could be sufficient).