మూస:String-handling templates: కూర్పుల మధ్య తేడాలు

/doc
turn into navbox
పంక్తి 1:
{{navbox
<noinclude><big>List of templates in {{cat|String manipulation templates}}.</big>
| title= String handling templates
</noinclude>==Templates==
| name=String templates see also text/sandbox
===[[Trim (programming)|Trimming]] strings by counting===
| state={{{state}|}}}
* {{tl|Str mid}} &mdash; 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]].''
| group1 === [[Trim (programming)|TrimmingTrim]] strings by counting===
| list1=
* {{tl|Str mid}} &mdash; To return a substring, specified by its position and length.
* {{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}} To crop a specified number of characters off the beginning and end.
* {{tl|Str right}} To trim the first specified number of characters.
* {{tl|Str rightc}} To return a number of characters from the end, returns a parameter if the string is empty.
* {{tl|Str rightmost}} To trim down to the last specified number of characters.
* {{tl|Str sub old}} To trim down to a specified number, starting at a given number from the left.
* {{tl|Str sub new}} Select a substr based on starting and ending index.
* {{tl|Str index}} – Returns a given character from a string, but not accented letters.
 
| group2===Trimming stringsTrim by character checking===
| list2=
* {{tl|Trim}} To trim any leading or trailing whitespace ({{tl|Strip whitespace}} does so too, but is less effective)
* {{tl|First word}} — To trim down to the first space.
* {{tl|Remove firstFirst word}} To removetrim anythingdown beforeto the first space.
* {{tl|StrRemove letter/trimfirst word}} To trimremove downanything tobefore the beginningfirst lettersspace.
* {{tl|Str numberletter/trim}} To trim down to the beginning numbersletters.
* {{tl|TitleStr without disambignumber/trim}} To trim offdown any parenthesis text atto the end of abeginning stringnumbers.
* {{tl|Title disambig text}} – Returns text in parenthesis at the end of a string.
 
| group3===Inserting Insert strings===
|list3=
* {{[[Template:Repeattl|Repeat]]}} Repeat character string n times
* {{tl|Replace}} Returns the string, after replacing ''all'' occurrences of a specified string with another string.
* {{[[Template:Strloc inserttl|Strloc insert]]}} - Inserts a string at character location strloc, or appends if strloc<=0.
* {{[[Template:Strloc prefixtl|Strloc prefix]]}} - Extracts string prefix up to location strloc, or whole string if strloc<=0.
* {{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.
* {{[[Template:Str reptl|Str rep]]len}} Returns the string, after replacing the first occurrence of a specified string's with another stringlength.
* {{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.
===Analyzing strings templates===
* {{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. 1-based
* {{tl|Str find0}} – Zero-based substring search.
* {{tl|Str sub find}} – Searches a substring in a string at the given offset.
* {{tl|StrASCII indexcode}} – Returns athe givenASCII charactervalue fromof a string,single but not accented letterscharacter.
* {{tl|Str lenletter}} – Returns the number of letters that begin a string's length.
* {{tl|Str letternumber}} Returns the number of lettersnumbers that begin a string.
* {{tl|Str numbergtr str}} ReturnsCompares thetwo numberstrings offor numbersalphabetical thatorder, beginand returns a stringvalue accordingly.
* {{tl|Ship prefix}} — Returns the length of a ship name prefix, if listed.
 
| group6=Trim, dedicated
===String length comparison templates===
| list6=
* {{tl|WikiProjectbasename}} - Removes "WikiProject" from a pagename
* {{tl|Remove unranked}} - Removes the string "unranked_" from the left of a string (taxonomy).
* {{tl|Ship prefix}} Returns the length of a ship name prefix, if listed (ship names).
* {{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).
 
=|group11=Technical developments==
* {{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.
 
;|group12=Feature requests:
==Test cases==
|list12
[[Wikipedia:Template sandbox and test cases|Sandboxes and test cases]]:
* [[bugzilla:6455]] - Set $wgPFEnableStringFunctions = true on WMF wikis
* [[bugzilla:26092]] - Enable or install string parsing wikimarkup functionality on WMF wikis
 
<!-- 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
}}</noinclude>==Templates==
 
==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
<noinclude>
{{documentation}}
</noinclude>
"https://te.wikipedia.org/wiki/మూస:String-handling_templates" నుండి వెలికితీశారు