Doctor Who Cuttings Archive

Difference between revisions of "Template:InvertName"

From The Doctor Who Cuttings Archive
Jump to navigationJump to search
Line 2: Line 2:
 
{{#vardefine:pos | {{#rpos:temp|" "}} }}
 
{{#vardefine:pos | {{#rpos:temp|" "}} }}
 
{{#if: {{#expr: pos > 0}}  
 
{{#if: {{#expr: pos > 0}}  
     | {{#vardefine:lastName  | {{#sub: temp | {{#expr: pos + 1 }} }} }}
+
     | {{#vardefine:lastName  | {{#sub: {{#var:temp}} | {{#expr: pos + 1 }} }} }}
       {{#vardefine:firstName | {{#sub: temp | 0 | {{#expr: pos - 1 }} }} }}
+
       {{#vardefine:firstName | {{#sub: {{#var:temp}} | 0 | {{#expr: pos - 1 }} }} }}
 
       lastName, firstName
 
       lastName, firstName
 
     | {{#var:temp}}
 
     | {{#var:temp}}
 
}}
 
}}
{{#var:pos}}
 

Revision as of 12:47, 20 October 2013


lastName, firstName