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 tracker — its ESOUI page; the code belongs to its author. Shown because documentation without a working example is half a reference.
Most-downloaded addons using it
| Addon | Total downloads |
|---|---|
| HodorReflexes - DPS & ULT tracker | 3,446,840 |
| LibCharacterKnowledge | 1,771,857 |
| Loot Log | 1,608,502 |
| Character Knowledge (Research, Motif, Recipe, Furnishing Plan and Scribing Tracker) | 733,709 |
| LibMultiAccountSets | 425,740 |
| Group Loot Notifier | 363,639 |