Pojdi na vsebino

Predloga:Trim/dok

Iz Wikiverza

Predloga:Notice

This template trims leading and trailing (but not interior) whitespace from a string. The string should be passed as the first unnamed parameter. The parameter must be named Predloga:Para if its value contains a = character.

You may substitute this template - that is, if used as Predloga:Tlxs, the resulting wikicode is "clean".

Usage

[uredi]

{{trim|text}} = text with any leading or trailing whitespace removed.

Examples

[uredi]
  • "{{trim| abc}}" produces "abc"
  • "{{trim|xyz }}" produces "xyz"
  • "{{trim| abc xyz }}" produces "abc xyz"

Template data

[uredi]

Predloga:TemplateDataHeader

The template trims whitespace from a string.

Parametri predloge[Urejanje podatkov predloge]

ParameterOpisVrstaStanje
String1

The string to be trimmed of whitespace

Nizzahtevano

See also

[uredi]


Predloga:String-handling templates