ESODecoded

HashString

ESO Lua API function — used by 36 of the 3,030 addons we indexed (combined 9,825,189 downloads). Signature from the official ESOUIDocumentation.txt, API version 101050.

Official signature

HashString(string text)

Returns: integer hashValue

Real usage — from HodorReflexes - DPS & ULT tracker

    local function getRandomValentinesIcon(userId, classId)
        local randomIconIndex = (HashString(userId .. classId) % iconCount) + 1
        return texturePath, unpack(textureCoordinates[randomIconIndex])

Short excerpt from the shipping addon HodorReflexes - DPS & ULT trackerits ESOUI page; the code belongs to its author. Shown because documentation without a working example is half a reference.

Most-downloaded addons using it

AddonTotal downloads
HodorReflexes - DPS & ULT tracker3,446,840
LibCharacterKnowledge1,771,857
Loot Log1,608,502
Character Knowledge (Research, Motif, Recipe, Furnishing Plan and Scribing Tracker)733,709
LibMultiAccountSets425,740
Group Loot Notifier363,639