テーブルの入力を受け取り、そのテーブル内の文字列を全角で出力する lua スクリプトを作成したいと考えています。
input = {"Hello", " ", "World"}
print(full(table.concat(input)))
「Hello World」と表示されます。
私はこれを使って試しました:
local encoding = [[ 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!゛#$%&()*+、ー。/:;〈=〉?@[\\]^_‘{|}~]]
function char(i)
return encoding:sub(i:len(),i:len())
end
function decode(t)
for i=1,#t do t[i]=char(t[i]) end
return table.concat(t)
end
function returns(word, word_eol)
print(char(word_eol[2]))
end
しかし、それはうまくいきませんでした
注:これはhexchatのプラグインです。そのため、私はそれをprint(char(word_eol[2])))
hexchat でコマンドをフックすると、コマンド名であるテーブルが吐き出されるため、その後に入力されたもの