Difference between revisions of "Template:Curse"

From Co-Optitude Wiki
Jump to navigation Jump to search
Line 5: Line 5:
 
</pre>
 
</pre>
 
</noinclude>
 
</noinclude>
<includeonly>
+
<includeonly>{{#vardefine:curseLower|{{lc:{{{1}}}}}}}{{#vardefine:cursePrefixLen|1}}{{#ifeq:{{#sub:{{#var:curseLower}}|0|2}}|sh|{{#vardefine:cursePrefixLen|2}}}}{{#vardefine:curseSuffixLen|1}}{{#ifeq:{{#sub:{{#var:curseLower}}|-3}}|ing|{{#vardefine:curseSuffixLen|3}}}}{{#ifeq:{{#sub:{{#var:curseLower}}|-2}}|ed|{{#vardefine:curseSuffixLen|2}}}}{{#ifeq:{{#sub:{{#var:curseLower}}|-2}}|er|{{#vardefine:curseSuffixLen|2}}}}{{#ifeq:{{#var:curseLower}}|shit|{{#vardefine:curseSuffixLen|0}}}}{{#vardefine:cursePrefix|{{#sub:{{{1}}}|0|{{#var:cursePrefixLen}}}}}}{{#vardefine:curseSuffix|{{#sub:{{{1}}}|-{{#var:curseSuffixLen}}}}}}{{#vardefine:curseMiddle|{{#sub:{{{1}}}|{{#var:cursePrefixLen}}|-{{#var:curseSuffixLen}}}}}}<span class="rsCurse"><span class="rsCursePrefix">{{#var:cursePrefix}}</span><span class="rsCurseMiddle">{{#var:curseMiddle}}</span><span class="rsCurseSuffix">{{#var:curseSuffix}}</span></span></includeonly>
{{#vardefine:curseLower|{{lc:{{{1}}}}}}}
 
{{#vardefine:cursePrefixLen|{{#ifeq:{{#sub:{{#var:curseLower}}|0|2}}|sh|2|1}}}}
 
{{#vardefine:curseSuffixLen|1}}
 
{{#ifeq:{{#sub:{{#var:curseLower}}|-3}}|ing|{{#vardefine:curseSuffixLen|3}}}}
 
{{#vardefine:cursePrefix|{{#sub:{{{1}}}|0|{{#var:cursePrefixLen}}}}}}
 
{{#vardefine:curseSuffix|{{#sub:{{{1}}}|-{{#var:curseSuffixLen}}}}}}
 
{{#vardefine:curseMiddle|{{#sub:{{{1}}}|{{#var:cursePrefixLen}}|-{{#var:curseSuffixLen}}}}}}
 
 
 
* 1 = {{{1}}}
 
* curseLower = {{#var:curseLower}}
 
* cursePrefixLen = {{#var:cursePrefixLen}}
 
* curseSuffixLen = {{#var:curseSuffixLen}}
 
* cursePrefix = {{#var:cursePrefix}}
 
* curseMiddle = {{#var:curseMiddle}}
 
* curseSuffix = {{#var:curseSuffix}}
 
 
 
<span class="rsCurse"><span class="rsCursePrefix">{{#var:cursePrefix}}</span><span class="rsCurseMiddle">{{#var:curseMiddle}}</span><span class="rsCurseSuffix">{{#var:curseSuffix}}</span></span>
 
</includeonly>
 

Revision as of 10:09, 4 April 2020

Usage example:

{{Curse|heck}}