模板:Cipher

維基百科,自由的百科全書
文件圖示 模板文件

此模板從最多12位的數字中提取一位數。

用法

{{Cipher|{{{1}}}|{{{2}}}}}

第一個參數是一個整數,第二個是需提取數字的位數,從右到左計數(1,2,以此類推)。

若超過了設定的位數,返回0。

例子

{{Cipher|9876543210|0}}得到0。

{{Cipher|9876543210|9}}得到9。

{{Cipher|123456789|0}}得到9。

{{Cipher|123456789|8}}得到1。

{{Cipher|432109876543210|12}}得到2。

{{Cipher|432109876543210|13}}得到0!

注意

This template is used by templates with mathematical terms and therefore appears to be integrated in very few pages.