Method: String#hash

Defined in:
string.c

#hashInteger

Returns the integer hash value for self. The value is based on the length, content and encoding of self.

Related: Object#hash.

Returns:



4070
4071
4072
4073
4074
4075
# File 'string.c', line 4070

static VALUE
rb_str_hash_m(VALUE str)
{
    st_index_t hval = rb_str_hash(str);
    return ST2FIX(hval);
}