Difference between revisions of "Template:Str index"
From Ava Zinn Wiki
[unchecked revision] | [unchecked revision] |
(fix) |
(subst dislikes comments for some reason) |
||
Line 1: | Line 1: | ||
− | <includeonly>{{{{{subst|}}}#ifexpr:{{{{{subst|}}}str_len|subst={{{subst|}}}|{{{1|}}}}} < {{{2|0}}}|{{{{{subst|}}}FormattingError|String is not long enough}}| | + | <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> |
− | |||
− | |||
<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 15:15, 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.