Utility
convertStringToLower
function convertStringToLower(string)
Converts the specified string into lower case.
Parameters
string (string)
A string to edit
Return values
(string)
Returns the lower case version of the string
convertStringToUpper
function convertStringToUpper(string)
Converts the specified string into upper case.
Parameters
string (string)
A string to edit
Return values
(string)
Returns the upper case version of the string
decodeXML
function decodeXML(xmlstring)
Converts the specified XML string into an internal Lua table format for XML.
NOTE: The internal table format is not specifically documented. Use Debug package to output examples to learn the format.
Parameters
xmlstring (string)
A string representation of an XML document
Return values
(table)
An internal Lua table format for XML
getDiceTotal
Calculates the total value of the dice data table passed to this function. See dragdata.getDiceData for details of the dice data. If the individual dice list is missing, then it will be rebuilt from the dice expression key (“expr”). If the dice expression is missing, then it will be rebuilt as the addition of the individual dice.
Parameters
dicedata (table)
An integer indexed table of strings listing the dice expression and total, as well as the details of the individual dice to be used in the dice expression.
Return values
(number)
The calculated total of the dice data table, per the dice expression and dice values
encodeXML
Converts the internal Lua table format for XML into an XML string.
NOTE: The internal table format is not specifically documented. Use Debug package to output examples to learn the format.
Parameters
xmltable (table)
An internal Lua table format for XML
Return values
(string)
An XML string representation of an XML document.