Difference between revisions of "Stratonian"

m
m
Line 1: Line 1:
{{#vardefineecho:text|hello:world plus more words}}<br><br>
+
{{#vardefineecho:text|hello: world}}<br><br>
SUB = {{#sub:{{#var:text}}|{{#expr:{{#pos:{{#var:text}}|:}}+1}}}}<br><br>
+
{{#if:{{#pos:{{#var:text}}|:}}<!-- if ':' is in the text
{{#if:{{#pos:{{#var:text}}|:}}|{{ucfirst:{{#explode:{{#var:text}}|:|0}}}}:}}{{sc|{{#sub:{{#var:text}}|{{#expr:{{#pos:{{#var:text}}|:}}+1}}}}}}
+
-->|{{ucfirst:{{#explode:{{#var:text}}|:|0}}}}<!-- format string before ':'
 +
-->:{{sc|{{#sub:{{#var:text}}|{{#expr:{{#pos:{{#var:text}}|:}}+1}}}}}}<!-- format string after ':'
 +
-->|{{sc|{{#var:text}}}}}}<!-- else format as normal -->

Revision as of 21:47, 30 August 2023

hello: world

Hello:World