[Overview][Types][Classes][Index] Reference for unit 'StringHashList' (#lazutils)

TStringHashList.HashOf

Calculates the hash value for the specified String.

Declaration

Source position: stringhashlist.pas line 55

protected function TStringHashList.HashOf(

  const Key: string

):Cardinal;

Arguments

Key

  

String used to calculate the hash value for an item in the list.

Function result

Cardinal hash value for the specified Key.

Description

HashOf is a Cardinal function used to calculate and return the 32-bit hash value for the String in Key. HashOf examines all bytes values in Key (in reverse order). When CaseSensitive is set to False, the characters are converted to their uppercase equivalent for use in the hashing algorithm. Range and overflow checking are disabled in the HashOf method.

HashOf is used in the Add method to calculate the HashValue stored in the PStringHashItem entry for the hash item. It is also used in the Find method to get the hash value to locate in the storage for the List.

See also

TStringHashList.Add

  

Adds a hash item and optional data to the container.

TStringHashList.Find

  

Gets the ordinal position in List where the specified key (and data) are stored.

TStringHashList.CaseSensitive

  

Indicates if case sensitivity is used for hash item keys.

TStringHashList.List

  

Provides indexed access to the storage used in the container.

PStringHashItem

  

Pointer to a TStringHashItem instance.


Version 4.0 Generated 2025-05-03 Home