![]() | This is the template test cases page for the sandbox of Template:Strlen short. to update the examples. If there are many examples of a complicated template, later ones may break due to limits in MediaWiki; see the HTML comment "NewPP limit report" in the rendered page. You can also use Special:ExpandTemplates to examine the results of template uses. You can test how this page looks in the different skins with these links: |
Testing various simple cases
- {{strlen short|abc}} → 3
- {{strlen short|ab c}} → 4
- {{strlen short|a b c}} → 5
- {{strlen short|-23.6}} → 5
- {{strlen short|two words}} → 9
- {{strlen short|***stars}} → 8
Testing lengths 0-51
- {{strlen short|}} → 0
- {{strlen short|1}} → 1
- {{strlen short|12}} → 2
- {{strlen short|123}} → 3
- {{strlen short|1234}} → 4
- {{strlen short|12345}} → 5
- {{strlen short|123456}} → 6
- {{strlen short|1234567}} → 7
- {{strlen short|12345678}} → 8
- {{strlen short|123456789}} → 9
- {{strlen short|1234567890}} → 10
- {{strlen short|12345678901}} → 11
- {{strlen short|123456789.123456789.}} → 20
- {{strlen short|123456789.123456789.1}} → 21
- {{strlen short|123456789.123456789.123456789.}} → 30
- {{strlen short|123456789.123456789.123456789.1}} → 31
- {{strlen short|123456789.123456789.123456789.123456789.}} → 40
- {{strlen short|123456789.123456789.123456789.123456789.1}} → 41
- {{strlen short|123456789.123456789.123456789.123456789.123456789.}} → 50
- {{strlen short|123456789.123456789.123456789.123456789.123456789.1}} → 51
Testing side effects
The surrounding "+ +" is to check that this template does not output any surrounding whitespace.
- +{{strlen_short}}+ → +0+