hash : String -> Basics.Int
Turn a string into an integer value based on its contents.
When passed the empty string, the initialSeed
is returned.
hash "Lorem ipsum" == 2898375356
hashWithSeed : String -> Basics.Int -> Basics.Int
Like hash
, this turns a string into an integer value.
It differs in that you can provide your own seed, or your own initial hash value.
This allows you to hash two, or more, strings in sequence without concatenating them first.
hashWithSeed "ipsum" (hash "Lorem ") == hash "Lorem ipsum"
initialSeed : Basics.Int
The initial seed represents the starting point of a hash. In other words:
hash "" == initialSeed