跳至內容

模板:Yesno/doc

勤求古訓,博采眾方

{{Yesno}} 是布爾值判斷模板,將輸入值規範化輸出為 "yes" 或 "no"(空)。

基本用法

{{yesno|值}}

返回值

輸入 默認返回 等價輸入
yes / y / true / t / on / 是 / 開 yes 1
no / n / false / f / off / 否 / 關 (空) 0
(空) (空)
其他 yes

指定返回值

{{yesno|是|yes=是|no=否|blank=空}}

參見

  • {{Tlx}} — 模板調用示例
  • {{Mbox}} — 消息框元模板(內部使用 Yesno 判斷參數)
  • Module:Yesno — 底層 Lua 模塊,提供 支持