Шаблон:Str/len/doc: различия между версиями
Материал из Dwarf Fortress Wiki
Перейти к навигацииПерейти к поиску
PixCat (обсуждение | вклад) Новая страница: «Calculates length of {{{<nowiki/>1}}}. ==Examples== <pre>{{str/len|abc}}</pre> → {{str/len|abc}} <pre>{{str/len|Dwarf Fortress}}</pre> → {{str/len|Dwarf Fortress}} <pre>{{str/len|a b}}</pre> → {{str/len|a b}} ==Caveats== <pre>{{str/len|<nowiki/>}}</pre> → {{str/len|<nowiki/>}} This is due to MediaWiki's implementation of <nowiki> — <nowiki> tags are replaced with an identifier when parsed. For example, <code><nowiki>te...» |
GeloMor (обсуждение | вклад) Нет описания правки |
||
(не показаны 3 промежуточные версии этого же участника) | |||
Строка 19: | Строка 19: | ||
This is due to MediaWiki's implementation of <nowiki> — <nowiki> tags are replaced with an identifier when parsed. For example, <code><nowiki>text</nowiki></code> becomes {{wikisrc|<nowiki>text</nowiki>}}. (Note that {{action|purge||purging this page}} will display a different token, despite the contents being the same.) | This is due to MediaWiki's implementation of <nowiki> — <nowiki> tags are replaced with an identifier when parsed. For example, <code><nowiki>text</nowiki></code> becomes {{wikisrc|<nowiki>text</nowiki>}}. (Note that {{action|purge||purging this page}} will display a different token, despite the contents being the same.) | ||
<includeonly>[[ | <includeonly>[[Категория:Вспомогательные шаблоны]][[en:Template:Str/len]]</includeonly> | ||
<noinclude>[[Category:Template | <noinclude>[[Category:Документация шаблонов]][[en:Template:Str/len/doc]]</noinclude> |
Текущая версия от 21:29, 15 января 2025
Calculates length of {{{1}}}.
Examples
{{str/len|abc}}
→ {{#strlen:abc}}
{{str/len|Dwarf Fortress}}
→ {{#strlen:Dwarf Fortress}}
{{str/len|a b}}
→ {{#strlen:a b}}
Caveats
{{str/len|<nowiki/>}}
→ {{#strlen:}}
This is due to MediaWiki's implementation of <nowiki> — <nowiki> tags are replaced with an identifier when parsed. For example, <nowiki>text</nowiki>
becomes Шаблон:Wikisrc. (Note that Шаблон:Action will display a different token, despite the contents being the same.)