marrub
/
Lithia
Archived
1
0
Fork 0
This repository has been archived on 2023-06-17. You can view files and clone it, but cannot push or open issues/pull-requests.
Lithia/strh.rb

15 lines
228 B
Ruby

#!/usr/bin/env ruby
## Copyright © 2017 Graham Sanderson, all rights reserved.
## strh: Simple string hash utility.
res = 0
for ch in ARGV[0].each_codepoint
res = res * 101 + ch
res &= 0x7FFFFFFF
end
print res
## EOF