Difference between revisions of "Template:Curse"

From Co-Optitude Wiki
Jump to navigation Jump to search
Line 14: Line 14:
 
-->{{#ifeq:{{#var:curseLower}}|shit|{{#vardefine:curseSuffixLen|0}}}}<!--
 
-->{{#ifeq:{{#var:curseLower}}|shit|{{#vardefine:curseSuffixLen|0}}}}<!--
 
-->{{#vardefine:cursePrefix|{{#sub:{{{1}}}|0|{{#var:cursePrefixLen}}}}}}<!--
 
-->{{#vardefine:cursePrefix|{{#sub:{{{1}}}|0|{{#var:cursePrefixLen}}}}}}<!--
-->{{#vardefine:curseSuffix|{{#sub:{{{1}}}|{{#ifeq:{{#var:curseSuffixLen}}|0||{{#expr:-1*{{#var:curseSuffixLen}}}}}}}}}}<!--
+
-->{{#vardefine:curseSuffix|{{#ifeq:{{#var:curseSuffixLen}}|0||{{#sub:{{{1}}}|{{#expr:-1*{{#var:curseSuffixLen}}}}}}}}}}<!--
 
-->{{#vardefine:curseMiddle|{{#sub:{{{1}}}|{{#var:cursePrefixLen}}|{{#expr:-1*{{#var:curseSuffixLen}}}}}}}}<!--
 
-->{{#vardefine:curseMiddle|{{#sub:{{{1}}}|{{#var:cursePrefixLen}}|{{#expr:-1*{{#var:curseSuffixLen}}}}}}}}<!--
-->
+
Debug:
 
* 1 = {{{1}}}
 
* 1 = {{{1}}}
 
* curseLower = {{#var:curseLower}}
 
* curseLower = {{#var:curseLower}}
Line 24: Line 24:
 
* curseMiddle = {{#var:curseMiddle}}
 
* curseMiddle = {{#var:curseMiddle}}
 
* curseSuffix = {{#var:curseSuffix}}
 
* curseSuffix = {{#var:curseSuffix}}
<!--
 
 
--><span class="rsCurse"><!--
 
--><span class="rsCurse"><!--
 
   --><span class="rsCursePrefix">{{#var:cursePrefix}}</span><!--
 
   --><span class="rsCursePrefix">{{#var:cursePrefix}}</span><!--

Revision as of 10:20, 4 April 2020

Usage example:

{{Curse|heck}}