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.

Template:Str/len/doc

From Dwarf Fortress Wiki
< Template:Str/len
Revision as of 00:28, 25 June 2013 by Lethosor (talk | contribs) (Documentation!)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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.)