Template:Strip

Strip

Template documentation[view · edit · history · purge]
This documentation is transcluded from Template:Strip/doc.

Returns the input string after stripping characters left and/or right Category:Main message boxesCategory:Lua-based templates

In addition it can be completed with a header and/or a trailer string

Usage


{{Strip |1= }}

Template parameters

ParameterDescriptionDefaultStatus
1stringInput string (often the result of a template)pagenamerequired
2decimal numbernumber of positions for stripping left0optional
3decimal numbernumber of positions for stripping right0optional
hstringheader string, to prefix the resultemptyoptional
tstringtrailer string, to postfix the resultemptyoptional

Additional information

The template is intended to be used in the following namespaces: all namespaces

The template is intended to be used by the following user groups: all users

Relies on:
Module:Dsize

Examples

See also

Template:F with function code "M"
Str right, Str left

Localization

This template is not intended to be localized.

Category:Templates not requiring internationalization

Examples

  • {{Strip|Text example}} → Text example
  • {{Strip|Text example|5}} → example
  • {{Strip|Text example||2}} → Text examp
  • {{Ucfirst|{{Strip|Text example|5}}{{Strip|Text example|3=8}}}} → ExampleText
  • {{Strip|Text example|t= 1}} → Text example 1
  • {{Strip|Church floor map|6|3|h=Cathedral|t=plan}} → Cathedral floor plan Category:Lua-based templates Category:String manipulation templates
Category:Lua-based templates Category:Main message boxes Category:String manipulation templates Category:Templates not requiring internationalization