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/doc"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
(Documentation!)
 
m
 
Line 1: Line 1:
 
Calculates length of {{{<nowiki/>1}}}.
 
Calculates length of {{{<nowiki/>1}}}.
 
  
 
==Examples==
 
==Examples==
Line 19: Line 18:
  
 
This is due to MediaWiki's implementation of &lt;nowiki> &mdash; &lt;nowiki> tags are replaced with an identifier when parsed. For example, <code>&lt;nowiki>text&lt;/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 &lt;nowiki> &mdash; &lt;nowiki> tags are replaced with an identifier when parsed. For example, <code>&lt;nowiki>text&lt;/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>[[Category:Templates]]</includeonly>
 +
<noinclude>[[Category:Template Documentation]]</noinclude>

Latest revision as of 17:29, 23 July 2013

Calculates length of {{{1}}}.

Examples[edit]

{{str/len|abc}}

→ 3

{{str/len|Dwarf Fortress}}

→ 14

{{str/len|a
b}}

→ 3

Caveats[edit]

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