关于逐行逐行读取文本内容并写入数组

有关逐行写入的在这里

下面是关于逐行读取

fn maxfilelog finpath =
(
    fin = openfile finpath
    seek fin #eof
    maxlen=filepos fin
    seek fin 0
    res = readChars fin maxlen errorAtEOF:false
    filterString res "
"
) -- 将文件内容逐行添加到数组

之前想用来记录和读取配置文件,后来发现了更简单的...

getINISetting <filename_string> <section_string> <key_string>     
setINISetting <filename_string> <section_string> <key_string> <key_value_string> [ forceUTF16:<boolean> ]

官方文档

原文地址:https://www.cnblogs.com/3dxy/p/4150158.html