Slightly faster and more precise itemString extraction function call and pattern
m (yank first header) |
(Slightly faster and more precise itemString extraction function call and pattern) |
||
| Line 19: | Line 19: | ||
* <tt>"'''|r'''"</tt> – Restores color to normal | * <tt>"'''|r'''"</tt> – Restores color to normal | ||
You can extract the itemString from a given itemLink with the following | You can extract the itemString from a given itemLink with the following function: | ||
local | local itemString = string.match(itemLink, "^|c%x+|H(item[%d:]+)|h%[") | ||
Note: The format of the link is similar for enchant, spell and quest links, with merely the "itemstring" changing. See [[spellString]], [[enchantString]] and [[questString]] | Note: The format of the link is similar for enchant, spell and quest links, with merely the "itemstring" changing. See [[spellString]], [[enchantString]] and [[questString]] | ||