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

name update following move
Navbox with collapsible sections and Aligned tables
పంక్తి 1:
{{Navbox with collapsible sections
| name = String-handling templates
| state = {{{state|expanded}}}
| bodyclass = plainlist
| title = String-handling templates
| stateselected = {{{stateselected|{{{expanded|{{{1|}}}}}}}}}
| tracking = no <!--(keep all these string templates (by /doc pages) out of the tracking category)-->
 
<!---------------------- Trimming ------------------------->
| group1 = [[Trim (programming)|Trim]] by counting
| list1abbr1 = trim
| sect1 = [[Trim (programming)|Trim]]ming
* {{tl|Str mid}} – To return a substring, specified by its position and length.
| content1 =
* {{tl|Trunc}} – To trim down to a specified number of characters.
{{Navbox |child
* {{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.
 
| group2group1 = Trim byBy checkingcounting
| list2list1 =
{{Aligned table |fullwidth=on |style=text-align:left; |col1width=50%;
* {{tl|Trim}} – To trim any leading or trailing whitespace ({{tl|Strip whitespace}} does so too, but is less effective)
| {{Aligned table |style=padding-right:2.5em;
* {{tl|First word}} – To trim down to the first space.
|col1style=width:11.0em;text-align:right;white-space:nowrap;padding-right:0.75em; |col2style=font-style:italic;
* {{tl|Remove first word}} – To remove anything before the first space.
| {{tl|str mid}} | To return a substring specified by position and length.
* {{tl|Str letter/trim}} – To trim down to the beginning letters.
* | {{tl|Str number/trimtrunc}} | To trim down to thea specified number beginningof numberscharacters.
| {{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.
}}
| {{Aligned table
|col1style=width:11.0em;text-align:right;white-space:nowrap;padding-right:0.75em; |col2style=font-style:italic;
| {{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.
}} }}
 
| group3group2 = InsertBy stringschecking
| list3list2 =
{{Aligned table |fullwidth=on |style=text-align:left; |col1width=50%;
* {{tl|Loop}} – Repeat character string n times
| {{Aligned table |style=padding-right:2.5em;
* {{tl|Replace}} – Returns the string, after replacing ''all'' occurrences of a specified string with another string.
|col1style=width:11.0em;text-align:right;white-space:nowrap;padding-right:0.75em; |col2style=font-style:italic;
* {{tl|Strloc insert}} – Inserts a string at character location strloc, or appends if strloc<=0.
| {{tl|trim}} | To trim any leading or trailing whitespace
* {{tl|Strloc prefix}} – Extracts string prefix up to location strloc, or whole string if strloc<=0.
| {{tl|strip whitespace}} | Less effective than {{tlf|trim}}.
* {{tl|Str rep|Str rep}} – Returns the string, after replacing the first occurrence of a specified string with another string.
| {{tl|first word}} | To trim down to the first space.
}}
| {{Aligned table
|col1style=width:11.0em;text-align:right;white-space:nowrap;padding-right:0.75em; |col2style=font-style:italic;
| {{tl|remove first word}} | To remove anything before the first space.
| {{tl|str letter/trim}} | To trim down to the beginning letters.
| {{tl|str number/trim}} | To trim down to the beginning numbers.
}} }}
 
| group4group3 = LengthDedicated
| list4list3 =
{{Aligned table |fullwidth=on |style=text-align:left; |col1width=50%;
* {{tl|Str len}} – Returns a string's length.
| {{Aligned table |style=padding-right:2.5em;
* {{tl|iflenge}} – IF LENgth Greater than or Equal to.
|col1style=width:11.0em;text-align:right;white-space:nowrap;padding-right:0.75em; |col2style=font-style:italic;
* {{tl|Str ≥ len}} – To check if a string is "longer or equally long" or "shorter" than a given length.
| {{tl|unlink}} | Removes wikilink brackets (wikicode).
* {{tl|Str ≤ len}} – To check if a string is "shorter or equally long" or "longer" than a given length.
* | {{tl|Strremove File lenprefix}} To check| if a string isRemoves "not equalFile:" (or "equalImage:") to a givenfrom lengthfilenames.
| {{tl|title without disambig}} | To trim off any parenthesis text at the end of a string (disambiguation).
* {{tl|Str ≤ ≥ len}} – To check if a string is "shorter", "equal", or "longer" than a given length.
| {{tl|title disambig text}} | Returns text in parenthesis at the end of a string (disambiguation).
}}
| {{Aligned table
|col1style=width:11.0em;text-align:right;white-space:nowrap;padding-right:0.75em; |col2style=font-style:italic;
| {{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's name prefix, if listed (ship names).
}} }}
}}
 
<!----------- Insertion, replacement, length -------------->
| group5 = Analyse string
| list5abbr2 = IRL
| sect2 = Insertion, replacement and length
* {{tl|Str endswith}} – To check if a string ends with a given string.
| content2 =
* {{tl|Str find}} – Returns the numerical location of a given string in a string.
{{Aligned table |style=margin:0 auto 0;text-align:left;
* {{tl|Strfind short}} – Returns the numerical location of a given string in a string.
| <!---(Insertion, replacement)--->
* {{tl|Str find0}} – Zero-based substring search.
{{Aligned table |style=padding-right:2.5em;
* {{tl|Str sub find}} – Searches a substring in a string at the given offset.
|col1style=text-align:right;white-space:nowrap;padding-right:0.75em; |col2style=font-style:italic;
* {{tl|ASCII code}} – Returns the ASCII value of a single character.
| {{tl|strloc insert}} | Inserts a string at character location strloc, or appends if strloc<{{=}}0.
* {{tl|Str letter}} – Returns the number of letters that begin a string.
* | {{tl|Strstrloc numberprefix}} | ReturnsExtracts thestring numberprefix ofup numbersto thatlocation beginstrloc, aor whole string if strloc<{{=}}0.
| {{tl|loop}} | Repeat character string n times
* {{tl|Str gtr str}} – Compares two strings for alphabetical order, and returns a value accordingly.
| {{tl|replace}} | Returns the string, after replacing ''all'' occurrences of a specified string with another string.
* {{tl|a or an}} – Takes a noun and produces the appropriate indefinite article, based on whether the first letter is a vowel.
| {{tl|str rep}} | Returns the string, after replacing the first occurrence of a specified string with another string.
| {{tl|str len}} | Returns a string's length.
}}
| <!---(Length)--->
{{Aligned table
|col1style=text-align:right;white-space:nowrap;padding-right:0.75em; |col2style=font-style:italic;
| {{tl|iflenge}} | [if len]gth [g]reater than or [e]qual to.
| {{tl|str ≥ len}} | To check if a string is "longer or equally long" or "shorter" than a given length.
| {{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.
}} }}
 
<!----------------- Analysis, technical ------------------->
| group6 = Trim, dedicated
| abbr3 = anlys/tech
| list6 =
| sect3 = Analysis and technical
* {{tl|WikiProjectbasename}} - Removes "WikiProject" from a pagename
| content3 =
* {{tl|Remove unranked}} - Removes the string "unranked_" from the left of a string (taxonomy).
{{Aligned table |style=margin:0 auto 0;text-align:left;
* {{tl|Ship prefix}} – Returns the length of a ship name prefix, if listed (ship names).
| <!---(Analysis)--->
* {{tl|Title without disambig}} – To trim off any parenthesis text at the end of a string (disambiguation).
{{Aligned table |style=padding-right:2.5em;
* {{tl|Title disambig text}} – Returns text in parenthesis at the end of a string (disambiguation).
|col1style=text-align:right;white-space:nowrap;padding-right:0.75em; |col2style=font-style:italic;
* {{tl|Unlink}} – Removes wikilink brackets (wikicode).
| {{tl|str endswith}} | To check if a string ends with a given string.
* {{tl|Remove file prefix}}—Removes "File:" or "Image:" from filenames.
| {{tl|str find}}<br/>{{tl|strfind short}} |style2.2=vertical-align:middle;|''Returns the numerical location of a given string in a string.''
 
| {{tl|str find0}} | Zero-based substring search.
| group11 = Technical
| {{tl|str sub find}} | Searches a substring in a string at the given offset.
| list11 =
| {{tl|str letter}} | Returns the number of letters that begin a string.
* [[Module:String]]
| {{tl|str number}} | Returns the number of numbers that begin a string.
* [[mw:Help:Magic words]] – About <code><nowiki>{{padleft:|}}</nowiki></code>.
| {{tl|str gtr str}} | Compares two strings for alphabetical order, and returns a value accordingly.
* [[mw:Help:Extension:ParserFunctions]] – About <code><nowiki>{{#titleparts:|}}, {{#expr:|}}, {{#ifeq:|}}, </nowiki></code> etc.
}}
| <!---(Analysis cont'd)--->
{{Aligned table
|col1style=text-align:right;white-space:nowrap;padding-right:0.75em; |col2style=font-style:italic;
| {{tl|ASCII code}} | Returns the ASCII value of a single character.
| {{tl|a or an}} | Takes a noun and produces the appropriate indefinite article, based on whether the first letter is a vowel.
| &nbsp; | &nbsp;
<!---(Technical)--->
| [[Module:String]] |
| [[mw:Help:Magic words|...Magic words]] | {{noitalic|About <code><nowiki>{{padleft:&#124;}}</nowiki></code>.}}
| [[mw:Help:Extension:ParserFunctions|...ParserFunctions]] | {{noitalic|About <code><nowiki>{{#titleparts:&#124;}}, {{#expr:&#124;}}, {{#ifeq:&#124;}}, </nowiki></code> etc.}}
}} }}
 
<!--------------------- (disabled) ------------------------>
<!----
| group12 = Feature requests
| list12 <!-- = -->
* [[bugzilla:6455]] – Set $wgPFEnableStringFunctions = true on WMF wikis
* [[bugzilla:26092]] – Enable or install string parsing wikimarkup functionality on WMF wikis
Line 97 ⟶ 146:
----->
 
<!----------------------- below --------------------------->
| belowclass = hlist
| below =
Line 102 ⟶ 152:
* [[m:Category:String templates]]
* [[:commons:Category:String manipulation templates]]
 
| tracking = no <!--(keep all these string templates (by /doc pages) out of the tracking category)-->
 
}}<noinclude>{{Documentation}}</noinclude>
"https://te.wikipedia.org/wiki/మూస:String-handling_templates" నుండి వెలికితీశారు