| grandMA3 ユーザマニュアル » プラグイン » Lua 関数 - Object-Free API » GetTokenName(string) | Version 2.2 |
GetTokenName 関数は、短縮形の文字列入力に対応する完全なキーワード文字列を返します。対応するキーワードがない場合は nil を返します。
― または ―
"seq" という短縮形に対応する完全なキーワードを出力します。
Lua |
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 |