Jump to content
Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

This is the documentation page for Module:Utils

本模块为音MAD中文维基专门设计的工具类模块,且为元模块,请勿在模板中使用。

目前一共有以下方法,更多方法正在开发:

isInArray
用于判断元素是否在数组 table 中,若存在则返回 true,用法:
isInArray(value, table)
isInDict
用于判断元素是否在键值对 table,只要是键或者值都会返回 true,用法
isInDict(value, table)
switch
与其它语言 switch 语句类似的方法。
eval
如你所见,基于loadString实现的eval函数,用于执行字符串表达式。