Skip to content

GetTokenName(string)

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.

  • String:
    The string input should correspond to a short version of a keyword.
  • String:
    A string with the full keyword is returned.

- OR -

  • Nil:
    If there is no corresponding keyword, then nil is returned.

This example returns the full keyword matching the short “seq” string:

Copy CodeLua
```
return function()
-- Store a short string to be used as input
local shortToken = 'seq'
-- Get the full token name
local tokenName = GetTokenName(shortToken)
-- Print useful output if nil is not returned
if tokenName ~= nil then
Printf("The full version of '".. shortToken .. "' is '" .. tokenName .. "'")
end

end