A Project of the Center for Advanced Study in the Visual Arts, National Gallery of Art
History of Early American Landscape Design

Template:Strlen short/doc

[http://www.nga.gov/content/ngaweb/research/casva/research-projects.html A Project of the National Gallery of Art, Center for Advanced Study in the Visual Arts ]

The Template:Strlen_short gives the length of parameter 1, as a string, with a count of 0-50 characters, using a simple, quick method. The template was designed to use only 2 levels of expansion depth, rather than 9-13 or more levels as in other string-length templates.

Usage:  {{strlen short|abcdef}}       → 6
{{strlen short|123456789.}} → 10
{{strlen short|2.4| extra= -1}} → 3

The optional parameter "extra= -1" can be used to return a specific value when a string exceeds the 50-character limit. The default result is -1 to indicate a string longer than 50 characters.

See also

  • {{Strlen_quick}} - to get string lengths quickly up to 0-70, but has expansion depth 5.
  • {{Str len}} - handles strings up to 500 long, but with expansion depth 9-13 or more.


Retrieved from "https://heald.nga.gov/mediawiki/index.php?title=Template:Strlen_short/doc&oldid=1381"

History of Early American Landscape Design contributors, "Template:Strlen short/doc," History of Early American Landscape Design, , https://heald.nga.gov/mediawiki/index.php?title=Template:Strlen_short/doc&oldid=1381 (accessed December 27, 2024).

A Project of the Center for Advanced Study in the Visual Arts

National Gallery of Art, Washington