<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh">
	<id>https://wiki.itworks.cc/index.php?action=history&amp;feed=atom&amp;title=Template%3A%E5%AD%97%E4%B8%B2%E6%A8%A1%E6%9D%BF%E4%B8%80%E8%A6%BD</id>
	<title>Template:字串模板一覽 - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.itworks.cc/index.php?action=history&amp;feed=atom&amp;title=Template%3A%E5%AD%97%E4%B8%B2%E6%A8%A1%E6%9D%BF%E4%B8%80%E8%A6%BD"/>
	<link rel="alternate" type="text/html" href="https://wiki.itworks.cc/index.php?title=Template:%E5%AD%97%E4%B8%B2%E6%A8%A1%E6%9D%BF%E4%B8%80%E8%A6%BD&amp;action=history"/>
	<updated>2026-06-18T01:55:11Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.itworks.cc/index.php?title=Template:%E5%AD%97%E4%B8%B2%E6%A8%A1%E6%9D%BF%E4%B8%80%E8%A6%BD&amp;diff=656&amp;oldid=prev</id>
		<title>甲虫：​导入1个版本</title>
		<link rel="alternate" type="text/html" href="https://wiki.itworks.cc/index.php?title=Template:%E5%AD%97%E4%B8%B2%E6%A8%A1%E6%9D%BF%E4%B8%80%E8%A6%BD&amp;diff=656&amp;oldid=prev"/>
		<updated>2024-10-14T07:17:07Z</updated>

		<summary type="html">&lt;p&gt;导入1个版本&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2024年10月14日 (一) 07:17的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;zh&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;（没有差异）&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>甲虫</name></author>
	</entry>
	<entry>
		<id>https://wiki.itworks.cc/index.php?title=Template:%E5%AD%97%E4%B8%B2%E6%A8%A1%E6%9D%BF%E4%B8%80%E8%A6%BD&amp;diff=655&amp;oldid=prev</id>
		<title>zh&gt;Sanmosa：​// Edit via Wikiplus</title>
		<link rel="alternate" type="text/html" href="https://wiki.itworks.cc/index.php?title=Template:%E5%AD%97%E4%B8%B2%E6%A8%A1%E6%9D%BF%E4%B8%80%E8%A6%BD&amp;diff=655&amp;oldid=prev"/>
		<updated>2024-05-21T14:14:54Z</updated>

		<summary type="html">&lt;p&gt;// Edit via Wikiplus&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;noinclude&amp;gt;{{NoteTA&lt;br /&gt;
|G1=IT&lt;br /&gt;
}}&amp;lt;/noinclude&amp;gt;{{Navbox with collapsible groups&lt;br /&gt;
| name = 字串模板一覽&lt;br /&gt;
| state = {{{state|expanded}}}&lt;br /&gt;
| bodyclass = plainlist&lt;br /&gt;
| title = 字符串處理模板&lt;br /&gt;
| selected = {{{selected|{{{expanded|{{{1|}}}}}}}}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---------------------- Trimming -------------------------&amp;gt;&lt;br /&gt;
| abbr1 = trim&lt;br /&gt;
| sect1 = {{tsl|en|Trimming (computer programming)|Trim (編程)|切短}}&lt;br /&gt;
| list1 =&lt;br /&gt;
 {{Navbox|child&lt;br /&gt;
&lt;br /&gt;
  |group1 = 根据数量处理&lt;br /&gt;
  | list1 =&lt;br /&gt;
   {{Aligned table |fullwidth=on |style=text-align:left; |col1width=50%;&lt;br /&gt;
    | {{Aligned table |style=padding-right:2.5em;&lt;br /&gt;
       |col1style=width:12.5em;text-align:right;white-space:nowrap;padding-right:0.75em; &amp;lt;!--|col2style=font-family:serif;--&amp;gt;&lt;br /&gt;
       | {{tl|str mid}}       | 按位置及長度選取子串。&lt;br /&gt;
       | {{tl|trunc}}         | 切短到规定的字数。&lt;br /&gt;
       | {{tl|str left}}      | 切短或重复填充到规定的字数。&lt;br /&gt;
       | {{tl|str crop}}      | 從末尾切短特定數量的字元。&lt;br /&gt;
       | {{tl|chop head and tail}} | To crop a specified number of characters off the beginning and end.&lt;br /&gt;
      }}&lt;br /&gt;
    | {{Aligned table&lt;br /&gt;
       |col1style=width:12.5em;text-align:right;white-space:nowrap;padding-right:0.75em; &amp;lt;!--|col2style=font-family:serif;--&amp;gt;&lt;br /&gt;
       | {{tl|str right}}     | 返回从左向右移除若干个字符后的字符串&lt;br /&gt;
       | {{tl|str rightc}}    | 返回从后向前指定数量的字符串，如果字符串为空则返回一个参数&lt;br /&gt;
       | {{tl|str sub old}}   | To trim down to a specified number, starting at a given number from the left.&lt;br /&gt;
       | {{tl|str sub new}}   | Select a substr based on starting and ending index.&lt;br /&gt;
       | {{tl|str index}}     | 返回字符串的第×个字符&lt;br /&gt;
   }} }}&lt;br /&gt;
&lt;br /&gt;
  | group2 = 根据条件处理&lt;br /&gt;
  | list2 =&lt;br /&gt;
   {{Aligned table |fullwidth=on |style=text-align:left; |col1width=50%;&lt;br /&gt;
    | {{Aligned table |style=padding-right:2.5em;&lt;br /&gt;
       |col1style=width:12.5em;text-align:right;white-space:nowrap;padding-right:0.75em; &amp;lt;!--|col2style=font-family:serif;--&amp;gt;&lt;br /&gt;
       | {{tl|trim}}                | 移除首尾空格。&lt;br /&gt;
       | {{tl|str letter/trim}}     | To trim down to the beginning letters.&lt;br /&gt;
       | {{tl|str number/trim}}     | To trim down to the beginning numbers.&lt;br /&gt;
       | {{tl|trim brackets}}       | To trim any leading or trailing square brackets.&lt;br /&gt;
       | {{tl|trim quotes}}         | To trim leading or trailing matches quotes. &lt;br /&gt;
      }}&lt;br /&gt;
    | {{Aligned table&lt;br /&gt;
       |col1style=width:12.5em;text-align:right;white-space:nowrap;padding-right:0.75em; &amp;lt;!--|col2style=font-family:serif;--&amp;gt;&lt;br /&gt;
       | {{tl|String split}}        | 從長字符串中抽取短字符串。&lt;br /&gt;
       | {{tl|first word}}          | 切短至首個空格前。&lt;br /&gt;
       | {{tl|remove first word}}   | 移除首個空格前的內容。&lt;br /&gt;
       | {{tl|last word}}           | 切短至最後一個空格前。&lt;br /&gt;
       | {{tl|remove last word}}    | 移除最後一個空格前的內容。&lt;br /&gt;
   }} }}&lt;br /&gt;
&lt;br /&gt;
  | group3 = 专用于Wiki语法&lt;br /&gt;
  | list3 =&lt;br /&gt;
   {{Aligned table |fullwidth=on |style=text-align:left; |col1width=50%;&lt;br /&gt;
    | {{Aligned table |style=padding-right:2.5em;&lt;br /&gt;
       |col1style=width:12.5em;text-align:right;white-space:nowrap;padding-right:0.75em; &amp;lt;!--|col2style=font-family:serif;--&amp;gt;&lt;br /&gt;
       | {{tl|除鏈}}&amp;lt;!-- delink --&amp;gt;              | 去除Wiki連結的括號（Wiki代碼）。&lt;br /&gt;
       | {{tl|remove file prefix}}  | 從檔案名中去除「File:」（或「Image:」）。&lt;br /&gt;
       | {{tl|PAGENAMEBASE}}        | 去除字串末尾的括號文本（消歧義）。&lt;br /&gt;
       | {{tl|title disambig text}} | 返回字串末尾的括號文本（消歧義）。&lt;br /&gt;
      }}&lt;br /&gt;
    | {{Aligned table&lt;br /&gt;
       |col1style=width:12.5em;text-align:right;white-space:nowrap;padding-right:0.75em; &amp;lt;!--|col2style=font-family:serif;--&amp;gt;&lt;br /&gt;
       | {{tl|WikiProjectbasename}} | Removes &amp;quot;WikiProject&amp;quot; from a pagename.&lt;br /&gt;
       | {{tl|remove unranked}}     | Removes the string &amp;quot;unranked_&amp;quot; from the left of a string (taxonomy).&lt;br /&gt;
       | {{tl|ship prefix}}         | Returns the length of a ship&amp;#039;s name prefix, if listed (ship names).&lt;br /&gt;
       | {{tl|title year}}          | Returns the 4-digit year from a pagename, if any.&lt;br /&gt;
   }} }}&lt;br /&gt;
 }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!----------- Insertion, replacement, length --------------&amp;gt;&lt;br /&gt;
| abbr2 = IRL&lt;br /&gt;
| sect2 = 插入、替換、長度&lt;br /&gt;
| list2 =&lt;br /&gt;
 {{Aligned table |style=margin:0 auto 0;text-align:left;&lt;br /&gt;
  |  &amp;lt;!---(Insertion, replacement)---&amp;gt;&lt;br /&gt;
    {{Aligned table |style=padding-right:2.5em;&lt;br /&gt;
     |col1style=text-align:right;white-space:nowrap;padding-right:0.75em; &amp;lt;!--|col2style=font-family:serif;--&amp;gt;&lt;br /&gt;
     | {{tl|strloc insert}} | Inserts a string at character location strloc, or appends if strloc&amp;lt;{{=}}0.&lt;br /&gt;
     | {{tl|loop}}          | 特定次數重複字串。&lt;br /&gt;
     | {{tl|replace}}       | 在字串中查找並全部替換某字串後返回。&lt;br /&gt;
     | {{tl|str rep}}       | 在字串中查找並替換首次出現的某字串後返回。&lt;br /&gt;
     | {{tl|digits}}        | 移除字串中不是數字（0～9）的字元。&lt;br /&gt;
    }}&lt;br /&gt;
  |  &amp;lt;!---(Length)---&amp;gt;&lt;br /&gt;
    {{Aligned table&lt;br /&gt;
     |col1style=text-align:right;white-space:nowrap;padding-right:0.75em; &amp;lt;!--|col2style=font-family:serif;--&amp;gt;&lt;br /&gt;
     | {{tl|str len}}       | 返回字串長度。&lt;br /&gt;
     | {{tl|str ≥ len}}    | 檢查一個字串和某一給定長度相比是「更長或等長」還是「更短」。&lt;br /&gt;
     | {{tl|str ≤ len}}    | 檢查一個字串和某一給定長度相比是「更短或等長」還是「更長」。&lt;br /&gt;
     | {{tl|str ≠ len}}    | 檢查一個字串和某一給定長度相比是「不等長」還是「等長」。&lt;br /&gt;
     | {{tl|str ≤ ≥ len}} | 檢查一個字串和某一給定長度相比是「更短」、「等長」還是「更長」。&lt;br /&gt;
 }} }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!----------------- Analysis, technical -------------------&amp;gt;&lt;br /&gt;
| abbr3 = anlys/tech&lt;br /&gt;
| sect3 = 分析、技術&lt;br /&gt;
| list3 =&lt;br /&gt;
 {{Aligned table |style=margin:0 auto 0;text-align:left;&lt;br /&gt;
  |  &amp;lt;!---(Analysis)---&amp;gt;&lt;br /&gt;
    {{Aligned table |style=padding-right:2.5em;&lt;br /&gt;
     |col1style=text-align:right;white-space:nowrap;padding-right:0.75em; &amp;lt;!--|col2style=font-family:serif;--&amp;gt;&lt;br /&gt;
     | {{tl|str endswith}}  | 检查是否以给定的字符串结尾。&lt;br /&gt;
     | {{tl|str find}}&amp;lt;br/&amp;gt;{{tl|strfind short}} |style2.2=vertical-align:middle;|&amp;#039;&amp;#039;在一個字串中搜尋並返回特定字串的位置。&amp;#039;&amp;#039;&lt;br /&gt;
     | {{tl|str find0}}     | Zero-based substring search.&lt;br /&gt;
     | {{tl|str sub find}}  | 从指定的偏移量开始搜索一个子字符串。&lt;br /&gt;
     | {{tl|str letter}}    | 返回一个字符串开头的所有字符。&lt;br /&gt;
     | {{tl|str number}}    | 返回一个字符串开头的所有数字。&lt;br /&gt;
     | {{tl|str gtr str}}   | 判断两个字符串是否相等，然后根据返回相应的值。&lt;br /&gt;
     | {{tl|str match}}     | 在一個字串中对正则表达式的查询结果进行分捕获组的输出。&lt;br /&gt;
    }}&lt;br /&gt;
  |  &amp;lt;!---(Analysis cont&amp;#039;d)---&amp;gt;&lt;br /&gt;
    {{Aligned table&lt;br /&gt;
     |col1style=text-align:right;white-space:nowrap;padding-right:0.75em; &amp;lt;!--|col2style=font-family:serif;--&amp;gt;&lt;br /&gt;
     | {{tl|ASCII code}}    | 返回单个字符的ASCII码值&lt;br /&gt;
     | {{tl|a or an}}       | Takes a noun and produces the appropriate indefinite article, based on whether the first letter is a vowel.&lt;br /&gt;
     | &amp;amp;nbsp; | &amp;amp;nbsp;&lt;br /&gt;
     &amp;lt;!---(Technical)---&amp;gt;&lt;br /&gt;
     | [[Module:String]]    | &lt;br /&gt;
     | [[mw:Help:Magic words|...Magic words]] | {{noitalic|About &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{padleft:&amp;amp;#124;}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
     | [[mw:Help:Extension:ParserFunctions|...ParserFunctions]] | {{noitalic|About &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#titleparts:&amp;amp;#124;}}, {{#expr:&amp;amp;#124;}}, {{#ifeq:&amp;amp;#124;}}, &amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; etc.}}&lt;br /&gt;
 }} }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--------------------- (disabled) ------------------------&amp;gt;&lt;br /&gt;
&amp;lt;!----&lt;br /&gt;
| group12 = 功能請求&lt;br /&gt;
| list12 =&lt;br /&gt;
* [[bugzilla:6455]] – Set $wgPFEnableStringFunctions = true on WMF wikis&lt;br /&gt;
* [[bugzilla:26092]] – Enable or install string parsing wikimarkup functionality on WMF wikis&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!----Not in a navbox:&lt;br /&gt;
| group13 = [[Wikipedia:Template sandbox and test cases|Sandboxes, testcases]]&lt;br /&gt;
| list13 =&lt;br /&gt;
* {{tl|Str find/sandbox}}&lt;br /&gt;
* {{tl|Str index/getchar/sandbox}}&lt;br /&gt;
* {{tl|Str index/getchar/testcases}}&lt;br /&gt;
* {{tl|Str index/sandbox}}&lt;br /&gt;
* {{tl|Str index/testcases}}&lt;br /&gt;
* {{tl|Str index any/sandbox}}&lt;br /&gt;
* {{tl|Str index any/testcases}}&lt;br /&gt;
* {{tl|Str left/sandbox}}&lt;br /&gt;
* {{tl|Str len/core/sandbox}}&lt;br /&gt;
* {{tl|Str len/sandbox}}&lt;br /&gt;
* {{tl|Str len/testcases}}&lt;br /&gt;
* {{tl|Str rightc/testcases}}&lt;br /&gt;
* {{tl|Str ≠ len/sandbox}}&lt;br /&gt;
* {{tl|Str ≠ len/testcases}}&lt;br /&gt;
 -----&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!----------------------- below ---------------------------&amp;gt;&lt;br /&gt;
| belowclass = hlist&lt;br /&gt;
| below =&lt;br /&gt;
* [[:Category:字符串處理模板]]&lt;br /&gt;
* [[m:Category:String templates]]&lt;br /&gt;
* [[:commons:Category:字符串處理模板]]&lt;br /&gt;
&lt;br /&gt;
| tracking = no &amp;lt;!--(keep all these string templates (by /doc pages) out of the tracking category)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;{{Documentation}}&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>zh&gt;Sanmosa</name></author>
	</entry>
</feed>