枋模
:
字串模板一覽
對HuaTaiLohankhapedia
Kàu tō-lám
跳至搜尋
-{zh-hans:查;zh-hant:閱;}-
论
编
文字列處理模板
切短
(
英语
:
-{Trimming (computer programming)}-
)
根據數量處理
{{
str mid
}}
揤位置佮長度選取子串。
{{
trunc
}}
切短到規定的字數。
{{
str left
}}
切短抑是重複坉塌著規定的字數。
{{
str crop
}}
對末尾切短特定數量的字元。
{{
chop head and tail
}}
To crop a specified number of characters off the beginning and end.
{{
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
}}
轉文字列的第×个文字
根據條件處理
{{
trim
}}
徙除首尾空格。
{{
str letter/trim
}}
To trim down to the beginning letters.
{{
str number/trim
}}
To trim down to the beginning numbers.
{{
trim brackets
}}
To trim any leading or trailing square brackets.
{{
trim quotes
}}
To trim leading or trailing matches quotes.
{{
String split
}}
對長文字列中抽取短文字列。
{{
first word
}}
切短到首个空格前。
{{
remove first word
}}
徙除首个空格前的內容。
{{
last word
}}
切短到最後一个空格前。
{{
remove last word
}}
徙除最後一个空格前的內容。
專用佇Wiki語法
{{
除鏈
}}
去除Wiki連結的括號(Wiki代碼)。
{{
remove file prefix
}}
對檔案名中去除「File:」(抑是「Image:」)。
{{
PAGENAMEBASE
}}
去除字串末尾的括號文本(消歧義)。
{{
title disambig text
}}
轉字串末尾的括號文本(消歧義)。
{{
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)的字元。
{{
str len
}}
轉字串長度。
{{
str ≥ len
}}
檢查一个字串佮某一予定長度相比是「愈長抑是等長」抑是「愈短」。
{{
str ≤ len
}}
檢查一个字串佮某一予定長度相比是「愈短抑是等長」抑是「愈長」。
{{
str ≠ len
}}
檢查一个字串佮某一予定長度相比是「無等長」抑是「等長」。
{{
str ≤ ≥ len
}}
檢查一个字串佮某一予定長度相比是「愈短」、「等長」抑是「愈長」。
分析、技術
{{
str endswith
}}
檢查敢以予定的文字列結尾。
{{
str find
}}
{{
strfind short
}}
佇一个字串中搜揣並轉特定字串的位置。
{{
str find0
}}
Zero-based substring search.
{{
str sub find
}}
對指定的偏徙量開始搜索一个子文字列。
{{
str letter
}}
轉一个文字列開頭的所有文字。
{{
str number
}}
轉一个文字列開頭的所有數字。
{{
str gtr str
}}
判斷兩个文字列敢相仝,了後根據轉相對應的值。
{{
str match
}}
佇一个字串中對正則表達到式的查詢結果進行分捕獲組的輸出。
{{
ASCII code
}}
轉單个文字的ASCII碼值
{{
a or an
}}
Takes a noun and produces the appropriate indefinite article, based on whether the first letter is a vowel.
Module:String
...Magic words
About
{{padleft:|}}
.
...ParserFunctions
About
{{#titleparts:|}}, {{#expr:|}}, {{#ifeq:|}},
etc.
:Category:文字列處理模板
m:Category:String templates
:Commons:Category:文字列處理模板
模板-{zh-cn:文档; zh-tw:文件;}-
[
-{zh-cn:创建; zh-tw:建立;}-
]
[
清除-{zh-hans:缓存;zh-hant:快取}-
]
编者可以在本模板的沙盒
(
-{zh-cn:创建; zh-tw:建立;}-
|
镜像
)
和测试样例
(
-{zh-cn:创建; zh-tw:建立;}-
)
页面进行实验。
请在
/doc
子页面中添加分类。
本模板的子页面
。
踅站選單
個人家私
登入
associated-pages
枋模
討論
閩南語(傳統漢字)
看
Tha̍k
看原始碼
看歷史
閣看
搜揣
踅站
頭頁
最近的改變
隨在揀頁
MediaWiki說明
特殊頁
家私
佗位連到遮
Siong-koan ê kái-piàn
印刷版本
固定連結
頁資訊