Difference between revisions of "Template:Curse"

From Co-Optitude Wiki
Jump to navigation Jump to search
(Created page with "<noinclude> Usage example: <pre> {{Curse|heck}} </pre> </noinclude> <includeonly>[{{{1}}}]</includeonly>")
 
Line 5: Line 5:
 
</pre>
 
</pre>
 
</noinclude>
 
</noinclude>
<includeonly>[{{{1}}}]</includeonly>
+
<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}}}}}}
 +
<span class="rsCurse"><span class="rsCursePrefix">{{#var:cursePrefix}}</span><span class="rsCurseMiddle">{{#var:curseMiddle}}</span><span class="rsCurseSuffix">{{#var:curseSuffix}}</span>
 +
</includeonly>

Revision as of 10:03, 4 April 2020

Usage example:

{{Curse|heck}}