Function String Manipulations Class

HashStringFast

Return a hash value for the specified string. Converts a string into a numeric identifier that is likely unique, given an appropriate value for vRangePrimeNumber. "Fast" version of the HashString function which has restrictive argument types. See the HashString function for details.

Signature (Visual Basic / VBA)

Public Function HashStringFast( _
      ByRef vSymbol As String _
    , ByRef vPrimeNumber As Long _
    ) As Long

Code Example

    HashStringFast("Hello", 4093) = 83
    HashStringFast("World", 4093) = 1445

Return Value

Function returns the hash value as a long-integer number (a Long).

Notes & Version History

vValue The string which is to be "hashed."