Hash strings to INT using Java

I’m not sure where I previously learned about the Java hashCode() method for strings, but it enabled us to quickly assign a unique-ish numerical hash from a textual product configuration and enabled us to search, group & report data where it would have been very difficult otherwise.

The hashCode() method works in Adobe ColdFusion 8-2021. I also tested it using CFTry.com and Railo + Lucee4 worked, but Lucee5 didn’t return anything so I’m not sure if it works or not.

Here’s the gist:
https://gist.github.com/JamoCA/e94b1100932db2c02b18eb11afc56079

原文链接:Hash strings to INT using Java

© 版权声明
THE END
喜欢就支持一下吧
点赞14 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容