跳到主要内容

toml

简介

Toml配置文档读取

Toml 是一种用于写配置的格式, 该pkg主要实现了将Toml读取到gs中

使用说明:

import pkg.toml;

// 读取toml文件
mixed res = toml.load(file_name);

//将toml文件内容转换为指定格式
mixed res = tompl.parse(file_content);

组件接口

toml.gs

函数原型函数作用
mixed parse(mixed file_content)解析toml文本内容返回map
mixed load(string path)读取toml文件并解析返回map