Difference between revisions of "Template:Str index"

From Ava Zinn Wiki
Jump to: navigation, search
[unchecked revision][unchecked revision]
(subst dislikes comments for some reason)
m (Reverted edits by Happy-melon (talk) to last version by Dragons flight)
Line 1: Line 1:
<includeonly>{{{{{subst|}}}#ifexpr:{{{{{subst|}}}str_len|subst={{{subst|}}}|{{{1|}}}}} < {{{2|0}}}|{{{{{subst|}}}FormattingError|String is not long enough}}|{{{{{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>{{#ifexpr:{{str_len|{{{1|}}}}} < {{{2|0}}}|{{FormattingError|String is not long enough}}|<!--
 +
-->{{str_index/logic|*{{str_left|{{{1|}}}|{{{2|0}}}}}*|{{str_left|{{{1|}}}|{{#expr:{{{2|0}}}-1}}}}}}<!--
 +
-->}}</includeonly><noinclude>
  
 
<nowiki>{{str_index|</nowiki>''text''|''number''<nowiki>}}</nowiki> = Returns the ''number'' character of ''text''.
 
<nowiki>{{str_index|</nowiki>''text''|''number''<nowiki>}}</nowiki> = Returns the ''number'' character of ''text''.

Revision as of 13:33, 23 March 2009


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

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