v50 Steam/Premium information for editors
- v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
- Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.
Difference between revisions of "Template:Str/len"
Jump to navigation
Jump to search
(simplify) |
(new parser functions) |
||
Line 1: | Line 1: | ||
− | <includeonly>{{# | + | <includeonly>{{#strlen:{{{1}}}}}</includeonly><noinclude> |
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> |
Latest revision as of 13:19, 29 January 2014
(view - edit - history - purge) Documentation
Calculates length of {{{1}}}.
Examples
{{str/len|abc}}
→ 3
{{str/len|Dwarf Fortress}}
→ 14
{{str/len|a b}}
→ 3
Caveats
{{str/len|<nowiki/>}}
→ 34
This is due to MediaWiki's implementation of <nowiki> — <nowiki> tags are replaced with an identifier when parsed. For example, <nowiki>text</nowiki>
becomes '"`UNIQ--nowiki-00000006-QINU`"'
. (Note that purging this page will display a different token, despite the contents being the same.)