Template:Trim leading/doc

From WikiLaw, the free legal repository
Jump to navigation Jump to search

Template:Mbox

Usage[edit]

Template:Tlx

Trims up to six instances of <prefix> (such as: 0 or "anti-") from the beginning of <input>. <Prefix> is set to "0" by default (for removing leading zeroes from numbers). Template will not properly work beyond the first whitespace in the input.

Limitations[edit]

  • Up to 100 chararacters in the input string. If possible, first check length of input string using Template:Tl. Using strings longer than 100 characters may result in the error "max index is 100 for str_sub".
  • Limited set of characters.
  • Snags on whitespace.
  • Expensive.

Examples[edit]

Template:TlxExpression error: Unexpected < operator.

Template:TlxExpression error: Unexpected < operator.

Template:TlxExpression error: Unexpected < operator.

Template:TlxExpression error: Unexpected < operator.

Template:TlxExpression error: Unexpected < operator.

Template:TlxExpression error: Unexpected < operator.

Technical[edit]

This template uses parser function {{padleft:}} and templates Template:Tl and Template:Tl.

See also[edit]

Template:Navbox with collapsible groups