GetTokenName(string)
Description
Section titled “Description”The GetTokenName Lua function returns a string with the full keyword based on the short version string input or nil if there is no corresponding keyword.
Arguments
Section titled “Arguments”- String:
The string input should correspond to a short version of a keyword.
Return
Section titled “Return”- String:
A string with the full keyword is returned.
- OR -
- Nil:
If there is no corresponding keyword, then nil is returned.
Example
Section titled “Example”This example returns the full keyword matching the short “seq” string:
| Copy CodeLua |
| ``` |
| return function() |
-- Store a short string to be used as inputlocal shortToken = 'seq'-- Get the full token namelocal tokenName = GetTokenName(shortToken)-- Print useful output if nil is not returnedif tokenName ~= nil then Printf("The full version of '".. shortToken .. "' is '" .. tokenName .. "'")endend