Difference between revisions of "Template:Str index"

From Ava Zinn Wiki
Jump to: navigation, search
[unchecked revision][unchecked revision]
(optional subst)
Line 1: Line 1:
<includeonly>{{#ifexpr:{{str_len|{{{1|}}}}} < {{{2|0}}}|{{FormattingError|String is not long enough}}|<!--
+
<includeonly>{{{{{subst|}}}#ifexpr:{{{{{subst|}}}str_len|subst={{{subst|}}}|{{{1|}}}}} < {{{2|0}}}|{{{{{subst|}}}FormattingError|String is not long enough}}|<!--
-->{{str_index/logic|*{{str_left|{{{1|}}}|{{{2|0}}}}}*|{{str_left|{{{1|}}}|{{#expr:{{{2|0}}}-1}}}}}}<!--
+
-->{{{{{subst|}}}str_index/logic|subst={{{subst|}}}*{{{{{subst|}}}str_left|subst={{{subst|}}}|{{{1|}}}|{{{2|0}}}}}*|{{{{{subst|}}}str_left|subst={{{subst|}}}|{{{1|}}}|{{{{{subst|}}}#expr:{{{2|0}}}-1}}}}}}<!--
 
-->}}</includeonly><noinclude>
 
-->}}</includeonly><noinclude>
  

Revision as of 15:11, 8 March 2009


{{str_index|text|number}} = Returns the number character of text.

Only supports a limited character set. Returns an error on unknown characters.