మూస:String-handling templates: కూర్పుల మధ్య తేడాలు
Content deleted Content added
/doc |
turn into navbox |
||
పంక్తి 1:
{{navbox
| title= String handling templates
</noinclude>==Templates==▼
| name=String templates see also text/sandbox
===[[Trim (programming)|Trimming]] strings by counting===▼
| state={{{state}|}}}
* {{tl|Str mid}} — To return a substring, specified by its position and length.▼
| above=''As of February 2013, these templates are being optimised using [[WP:Lua|Lua]] modules. More [[Template:String templates see also text|here]].''
| list1=
* {{tl|Trunc}} – To trim down to a specified number of characters.
* {{tl|Str left}} – To trim down to a specified number of characters, or duplicate the string to a specified number.
* {{tl|Str crop}} – To crop a specified number of characters off the end.
* {{tl|Chop head and tail}}
* {{tl|Str right}}
* {{tl|Str rightc}}
* {{tl|Str rightmost}}
* {{tl|Str sub old}}
* {{tl|Str sub new}}
* {{tl|Str index}} – Returns a given character from a string, but not accented letters.
| group2=
| list2=
* {{tl|Trim}}
* {{tl|
* {{tl|
* {{tl|Str
* {{tl|
* {{tl|Title disambig text}} – Returns text in parenthesis at the end of a string.▼
| group3=
|list3=
* {{tl|Replace}}
* {{
* {{
* {{tl|Str rep|Str rep}} – Returns the string, after replacing the first occurrence of a specified string with another string.
|group4= Length
▲* {{[[Template:Strloc insert|Strloc insert]]}} - Inserts a string at character location strloc, or appends if strloc<=0.
|list4=
▲* {{[[Template:Strloc prefix|Strloc prefix]]}} - Extracts string prefix up to location strloc, or whole string if strloc<=0.
* {{
* {{tl|iflenge}} – IF LENgth Greater then or Equal to.
▲* {{tl|Replace}} — Returns the string, after replacing ''all'' occurrences of a specified string with another string.
* {{tl|Str ≥ len}} – To check if a string is "longer or equally long" or "shorter" than a given length.▼
▲* {{[[Template:Repeat|Repeat]]}} — Repeat character string n times
* {{tl|Str ≤ len}} – To check if a string is "shorter or equally long" or "longer" than a given length.▼
* {{tl|Str ≠ len}} – To check if a string is "not equal" or "equal" to a given length.▼
* {{tl|Str ≤ ≥ len}} – To check if a string is "shorter", "equal", or "longer" than a given length.▼
| group5=Analyse string
| list5=
* {{tl|Str endswith}} – To check if a string ends with a given string.
* {{tl|Str find}} – Returns the numerical location of a given string in a string.
* {{tl|Strfind short}} – Returns the numerical location of a given string in a string.
* {{tl|Str find0}} – Zero-based substring search.
* {{tl|Str sub find}} – Searches a substring in a string at the given offset.
* {{tl|
* {{tl|Str
* {{tl|Str
* {{tl|Str
* {{tl|Ship prefix}} — Returns the length of a ship name prefix, if listed.▼
| group6=Trim, dedicated
| list6=
* {{tl|WikiProjectbasename}} - Removes "WikiProject" from a pagename
* {{tl|Remove unranked}} - Removes the string "unranked_" from the left of a string (taxonomy).
* {{tl|Title without disambig}} – To trim off any parenthesis text at the end of a string (disambiguation).
▲* {{tl|Title disambig text}} – Returns text in parenthesis at the end of a string (disambiguation).
* {{tl|Unlink}} – Removes wikilink brackets (wikicode).
▲* {{tl|Str ≥ len}} – To check if a string is "longer or equally long" or "shorter" than a given length.
|list11=
▲* {{tl|Str ≤ len}} – To check if a string is "shorter or equally long" or "longer" than a given length.
* [[Module:String]]▼
▲* {{tl|Str ≠ len}} – To check if a string is "not equal" or "equal" to a given length.
* [[mw:Help:Magic words]] – About <code><nowiki>{{padleft:|}}</nowiki></code>.▼
▲* {{tl|Str ≤ ≥ len}} – To check if a string is "shorter", "equal", or "longer" than a given length.
* [[mw:Help:Extension:ParserFunctions]] – About <code><nowiki>{{#titleparts:|}}, {{#expr:|}}, {{#ifeq:|}}, </nowiki></code> etc.▼
|list12
[[Wikipedia:Template sandbox and test cases|Sandboxes and test cases]]:▼
<!-- not in a navbox
▲|group13=[[Wikipedia:Template sandbox and test cases|Sandboxes and test cases]]:
|list13=
* {{tl|Str find/sandbox}}
Line 67 ⟶ 94:
* {{tl|Str ≠ len/sandbox}}
* {{tl|Str ≠ len/testcases}}
-->
| below=
* [[:Category:String manipulation templates]]
* [[m:Category:String templates]]
* [[:commons:Category:String manipulation templates]]
| belowclass=hlist
▲==Technical developments==
▲* [[Module:String]]
▲* [[mw:Help:Magic words]] – About <code><nowiki>{{padleft:|}}</nowiki></code>.
▲* [[mw:Help:Extension:ParserFunctions]] – About <code><nowiki>{{#titleparts:|}}, {{#expr:|}}, {{#ifeq:|}}, </nowiki></code> etc.
▲;Feature requests:
▲* [[bugzilla:6455]] - Set $wgPFEnableStringFunctions = true on WMF wikis
▲* [[bugzilla:26092]] - Enable or install string parsing wikimarkup functionality on WMF wikis
{{documentation}}
</noinclude>
|