Difference between revisions of "Template:Str index"
From Ava Zinn Wiki
[unchecked revision] | [unchecked revision] |
m (Reverted edits by Happy-melon (talk) to last version by Dragons flight) |
(Changing to the much more efficient {{str ≥ len}}. And added "((str index)):" in the beginning of the error message, so we can see what template is error reporting. Tested in /sandbox.) |
||
Line 1: | Line 1: | ||
− | <includeonly>{{ | + | <includeonly>{{str ≥ len |
− | + | | 1 = {{{1|}}} | |
− | + | | 2 = {{{2|0}}} | |
+ | | 3 = {{str index/logic|*{{str left|{{{1|}}}|{{{2|0}}}}}*|{{str left|{{{1|}}}|{{#expr:{{{2|0}}}-1}}}}}} | ||
+ | | 4 = {{FormattingError|((str index)): String is not long enough.}} | ||
+ | }}</includeonly><noinclude> | ||
− | <nowiki>{{ | + | == Template documentation == |
+ | |||
+ | <nowiki>{{str index|</nowiki>''text''|''number''<nowiki>}}</nowiki> = Returns the ''number'' character of ''text''. | ||
Only supports a limited character set. Returns an error on unknown characters. | Only supports a limited character set. Returns an error on unknown characters. |
Revision as of 01:50, 29 March 2009
Template documentation
{{str index|text|number}} = Returns the number character of text.
Only supports a limited character set. Returns an error on unknown characters.