Skip to main content

hash_code

Function hash_code 

Source
pub fn hash_code(s: &str) -> i32
Expand description

Computes 32-bit Java-compatible string hash code using UTF-16 code units.

Matches Remotion’s hashCode(str) exactly: hash = ((hash << 5) - hash + charCode) | 0