返回一個字元的ASCII碼值,注意只能是英文字母、數字及一些特殊符號。
{{ASCII code|字元}}
- {{ASCII code|q}}返回113
- {{ASCII code|Q}}返回81
請注意本模板僅支持ASCII碼位於32-126間的字元,除此之外的情況將會返回32(空格)。
字串處理模板 |
|---|
|
|---|
| 根據數量處理 | | | | {{str right}} | 返回從左向右移除若干個字元後的字串 | | {{str rightc}} | 返回從後向前指定數量的字串,如果字串為空則返回一個參數 | | {{str sub old}} | To trim down to a specified number, starting at a given number from the left. | | {{str sub new}} | Select a substr based on starting and ending index. | | {{str index}} | 返回字串的第×個字元 |
|
|
|---|
| 根據條件處理 | |
|---|
| 專用於Wiki語法 | | | | {{WikiProjectbasename}} | Removes "WikiProject" from a pagename. | | {{remove unranked}} | Removes the string "unranked_" from the left of a string (taxonomy). | | {{ship prefix}} | Returns the length of a ship's name prefix, if listed (ship names). | | {{title year}} | Returns the 4-digit year from a pagename, if any. |
|
|
|---|
|
|
插入、替換、長度 |
|---|
| {{strloc insert}} | Inserts a string at character location strloc, or appends if strloc<=0. | | {{loop}} | 特定次數重複字串。 | | {{replace}} | 在字串中查找並全部替換某字串後返回。 | | {{str rep}} | 在字串中查找並替換首次出現的某字串後返回。 | | {{digits}} | 移除字串中不是數字(0~9)的字元。 |
|
|
|
|
|
|