tmstring.chars
code:Lua
t = textmodule.tmstring.chars(str)
モジュール
引数
table:_
変数 型 概要
1 str string 元の文字列
返り値
table:_
変数 型 概要
1 t function イテレータ関数
概要
文字列strから、1文字ずつ順番に文字を返すイテレータ関数を得る。
例
code:Lua
require("textmodule")
i = 1
for t in textmodule.tmstring.chars("hello") do
print(i, t)
i = i+1
end
code:Console
1 h
2 e
3 l
4 l
5 o