Hash overloads

Synopses

Declared in <folly/external/farmhash/farmhash.h>

Hashes a string's bytes to a size_t value.

template<typename Str>
size_t
Hash(Str const& s);

Hashes a byte array to a size_t value.

size_t
Hash(
    char const* s,
    size_t len);

Return Value

  • The hash of the string.

  • The hash of the array.

Template Parameters

Name

Description

Str

String type whose data() and length() give the bytes to hash.

Parameters

Name

Description

s

String to hash.

len

Length of the array, in bytes.

Created with MrDocs