మూస:String-handling templates: కూర్పుల మధ్య తేడాలు
Content deleted Content added
→Inserting strings: add {{Str rep all}} |
→Trimming templates: separate conting and checking characters |
||
పంక్తి 2:
</noinclude>==Templates==
===[[Trim (programming)|Trimming]] templates===
;By counting characters:
* {{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.▼
;By character checking:
* {{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.
Line 14 ⟶ 20:
* {{tl|Title without disambig}} — To trim off any parenthesis text at the end of a string.
* {{tl|Title disambig text}} – Returns text in parenthesis at the end of a string.
▲* {{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.
===Inserting strings===
|