Difference between revisions of "Template:Italics after"
Jump to navigation
Jump to search
imported>Courcelles m (Protected Template:Italics after: Highly visible template ([edit=sysop] (indefinite) [move=sysop] (indefinite))) |
imported>Hyacinth (===Example=== :Both "<nowiki>{{Italics after|123456789|3}}</nowiki>" :and "<nowiki>{{Italics after|123 456789|3}}</nowiki>" :produce "{{Italics after|123456789|3}}") |
||
Line 1: | Line 1: | ||
<includeonly>{{#ifeq:{{{2|0}}}|0|''{{{1}}}''|{{str left|{{{1}}}|{{{2}}}}} ''{{str right|{{{1}}}|{{#expr:{{{2}}}+1}}}}''}}</includeonly><noinclude> | <includeonly>{{#ifeq:{{{2|0}}}|0|''{{{1}}}''|{{str left|{{{1}}}|{{{2}}}}} ''{{str right|{{{1}}}|{{#expr:{{{2}}}+1}}}}''}}</includeonly><noinclude> | ||
− | + | ==Usage== | |
This template takes two parameters, a string S and a number N; it adds italic markup to S, except for the first N characters. It will work correctly only if the N+1th character is a space (and may also be subject to length and character set restrictions). | This template takes two parameters, a string S and a number N; it adds italic markup to S, except for the first N characters. It will work correctly only if the N+1th character is a space (and may also be subject to length and character set restrictions). | ||
This is used as a subtemplate of {{tl|Italic title prefixed}}. | This is used as a subtemplate of {{tl|Italic title prefixed}}. | ||
+ | |||
+ | ===Example=== | ||
+ | :Both "<nowiki>{{Italics after|123456789|3}}</nowiki>" | ||
+ | :and "<nowiki>{{Italics after|123 456789|3}}</nowiki>" | ||
+ | :produce "{{Italics after|123456789|3}}" | ||
[[Category:String manipulation templates|Italics After]] | [[Category:String manipulation templates|Italics After]] | ||
</noinclude> | </noinclude> |
Revision as of 23:27, 17 July 2013
Usage
This template takes two parameters, a string S and a number N; it adds italic markup to S, except for the first N characters. It will work correctly only if the N+1th character is a space (and may also be subject to length and character set restrictions).
This is used as a subtemplate of {{Italic title prefixed}}.
Example
- Both "{{Italics after|123456789|3}}"
- and "{{Italics after|123 456789|3}}"
- produce "123 56789"