Template:Strlen/doc

From Wikipedia, the free encyclopedia

This is a documentation subpage for Template:Strlen (see that page for the template itself).
It contains usage information, categories and other content that is not part of the original template page.

This template finds the length of a given string. The string is given in parameter 1. It gives a correct result up to a string length of 64, after which it defaults at 65. Examples:

  • {{strlen|test}} gives 4
  • {{strlen|n}} gives 1
  • {{strlen|}} gives 64
  • {{strlen|bnd}} gives 3
  • {{strlen|{{void}}}} gives 64
  • {{strlen|functionalTemplate2}} gives 19
  • {{strlen|56}} gives 2