Template:String-handling templates: Difference between revisions
From Zoophilia Wiki
Jump to navigationJump to search
meta>Sardanaphalus Navbox with collapsible sections and Aligned tables |
meta>Sardanaphalus m width:12.5em to accommodate bolding |
||
Line 16: | Line 16: | ||
{{Aligned table |fullwidth=on |style=text-align:left; |col1width=50%; | {{Aligned table |fullwidth=on |style=text-align:left; |col1width=50%; | ||
| {{Aligned table |style=padding-right:2.5em; | | {{Aligned table |style=padding-right:2.5em; | ||
|col1style=width: | |col1style=width:12.5em;text-align:right;white-space:nowrap;padding-right:0.75em; |col2style=font-style:italic; | ||
| {{tl|str mid}} | To return a substring specified by position and length. | | {{tl|str mid}} | To return a substring specified by position and length. | ||
| {{tl|trunc}} | To trim down to a specified number of characters. | | {{tl|trunc}} | To trim down to a specified number of characters. | ||
Line 25: | Line 25: | ||
}} | }} | ||
| {{Aligned table | | {{Aligned table | ||
|col1style=width: | |col1style=width:12.5em;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 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 rightmost}} | To trim down to the last specified number of characters. | ||
Line 37: | Line 37: | ||
{{Aligned table |fullwidth=on |style=text-align:left; |col1width=50%; | {{Aligned table |fullwidth=on |style=text-align:left; |col1width=50%; | ||
| {{Aligned table |style=padding-right:2.5em; | | {{Aligned table |style=padding-right:2.5em; | ||
|col1style=width: | |col1style=width:12.5em;text-align:right;white-space:nowrap;padding-right:0.75em; |col2style=font-style:italic; | ||
| {{tl|trim}} | To trim any leading or trailing whitespace | | {{tl|trim}} | To trim any leading or trailing whitespace | ||
| {{tl|strip whitespace}} | Less effective than {{tlf|trim}}. | | {{tl|strip whitespace}} | Less effective than {{tlf|trim}}. | ||
Line 43: | Line 43: | ||
}} | }} | ||
| {{Aligned table | | {{Aligned table | ||
|col1style=width: | |col1style=width:12.5em;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|remove first word}} | To remove anything before the first space. | ||
| {{tl|str letter/trim}} | To trim down to the beginning letters. | | {{tl|str letter/trim}} | To trim down to the beginning letters. | ||
Line 53: | Line 53: | ||
{{Aligned table |fullwidth=on |style=text-align:left; |col1width=50%; | {{Aligned table |fullwidth=on |style=text-align:left; |col1width=50%; | ||
| {{Aligned table |style=padding-right:2.5em; | | {{Aligned table |style=padding-right:2.5em; | ||
|col1style=width: | |col1style=width:12.5em;text-align:right;white-space:nowrap;padding-right:0.75em; |col2style=font-style:italic; | ||
| {{tl|unlink}} | Removes wikilink brackets (wikicode). | | {{tl|unlink}} | Removes wikilink brackets (wikicode). | ||
| {{tl|remove File prefix}} | Removes "File:" (or "Image:") from filenames. | | {{tl|remove File prefix}} | Removes "File:" (or "Image:") from filenames. | ||
Line 60: | Line 60: | ||
}} | }} | ||
| {{Aligned table | | {{Aligned table | ||
|col1style=width: | |col1style=width:12.5em;text-align:right;white-space:nowrap;padding-right:0.75em; |col2style=font-style:italic; | ||
| {{tl|WikiProjectBASENAME}} | Removes "WikiProject" from a pagename. | | {{tl|WikiProjectBASENAME}} | Removes "WikiProject" from a pagename. | ||
| {{tl|remove unranked}} | Removes the string "unranked_" from the left of a string (taxonomy). | | {{tl|remove unranked}} | Removes the string "unranked_" from the left of a string (taxonomy). |