|
-
January 8th, 2010, 05:34 PM
#7
Re: Request an algorithm, convert a string to a unique int
It is impossible have a unique key for all strings.
Just sum all the values of string's elements (as char), or multiply, or 1st + 2nd*10 + 3rd*100 + 4th*1000... (I mean first second third as the strings first char second char when you think them as a char array. Of course starting with zero)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|