Template:Strip

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Strip

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

Returns the input string after stripping characters left and/or right

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

See also

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

Localization

This template is not intended to be localized.

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