Difference between revisions of "Template:Italics after"

From blackwiki
Jump to navigation Jump to search
imported>Courcelles
m (Protected Template:Italics after: Highly visible template ([edit=sysop] (indefinite) [move=sysop] (indefinite)))
imported>Primefac
m (Changed protection level for "Template:Italics after": high-risk template with 4000+ transclusions ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)))
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{#ifeq:{{{2|0}}}|0|''{{{1}}}''|{{str left|{{{1}}}|{{{2}}}}} ''{{str right|{{{1}}}|{{#expr:{{{2}}}+1}}}}''}}</includeonly><noinclude>
+
{{#ifeq:{{{2|0}}}|0
 
+
|''{{{1}}}''
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).
+
|{{str left|{{{1}}}|{{{2}}}}} ''{{str right|{{{1}}}|{{#expr:{{{2}}}+1}}}}''
 
+
}}<noinclude>
This is used as a subtemplate of {{tl|Italic title prefixed}}.
+
{{documentation}}
 
 
[[Category:String manipulation templates|Italics After]] 
 
 
</noinclude>
 
</noinclude>

Latest revision as of 16:30, 23 February 2018

{{{1}}}

Template documentation[view] [edit] [history] [purge]

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+1st 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

These two examples produce different results:
  • {{Italics after|123 456789|3}}123 456789
  • {{Italics after|123456789|3}}123 56789

See also