Difference between revisions of "Template:Trim prefix"

From Moegirlpedia
Jump to: navigation, search
m
 
Line 1: Line 1:
<noinclude>[[Category:辅助模板]]</noinclude>{{safesubst<noinclude/>:#invoke:String|replace|source={{{1|}}}|pattern=^(%s*)(.*)(%(.*%))(%s*)$|replace=%2|plain=false}}
+
<noinclude>{{Documentation}}[[Category:Auxiliary templates]]</noinclude>{{safesubst<noinclude/>:#invoke:String|replace|source={{{1|}}}|pattern=^(%s*)(.*)(%(.*%))(%s*)$|replace=%2|plain=false}}

Latest revision as of 15:27, 27 September 2021

Template-info.svg Template Documentation  [View] [Edit] [History] [Refresh]

This template is used to process series of entry strings separated by colons. By default, the entry name is taken after the colon. You can also set the second parameter to 1, and take the series name. There is no colon to return the original string.

Related templates: {{Trim_suffix}}

Example

{{Trim prefix|Water Margin:Zhang Qing}}

Water Margin:Zhang Qing

{{Trim prefix|Moegirlpedia:Everything can be moe|1|}}

Moegirlpedia:Everything can be moe

{{Trim prefix|Lin Chong}}

Lin Chong

Extended usage

  • The template can also be used to set other parameters
{{Trim prefix|Kantai Collection/Picture books}}

Kantai Collection/Picture books

{{Trim prefix|Kantai Collection:Kongo#Lines}}

Kantai Collection:Kongo#Lines