GetItemLinkName

From ESOUI Wiki

Jump to: navigation, search

Given an item link, this function returns the name of the specified item. If the argument isn't a valid item link, then the function returns an empty string.

Note that the returned name may have format codes on the end (e.g. ^n, which are intended for use by the LocalizeString native function (and the zo_strformat Lua function that wraps it); the returned name may also have inconsistent capitalization compared to other item names (e.g. "rawhide scraps^p" versus "Ichor").

Arguments

itemLink
A string containing an item link. It does not matter whether the link is in brackets.

Syntax

-- GIVEN:
-- number itemLink
--
-- RETURNS: string
local name = GetItemLinkName(itemLink) -- may contain localization control codes
 
local formattedName = LocalizeString("<<1>>", name) -- no control codes

External links

Personal tools
Namespaces
Variants
Actions
Menu
Wiki
Toolbox