Vorlage:Str rightc/Doku

Aus Wikivoyage
Zur Navigation springen Zur Suche springen

Usage[Bearbeiten]

{{Str rightc|<string>|<count>}}
{{Str rightc|<string>|<count>|<result if empty>}}

Gives a substring of length <count> of characters from the right-side end of the string.

Examples[Bearbeiten]

  • {{Str rightc| lorem ipsum dolor sit amet | 10 }} → r sit amet
  • {{Str rightc| lorem ipsum dolor sit amet | 1 }} → t
  • {{Str rightc| lorem ipsum dolor sit amet | 0 }}
  • {{Str rightc| | 1 | empty }} → empty
  • {{Str rightc |123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.1 | 99}} → 3456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.1

TemplateData[Bearbeiten]

Gives the right most <count> characters of a string.

Vorlagenparameter

ParameterBeschreibungTypStatus
String1

The string to be trimmed

Zeichenfolgeerforderlich
Count2

The number of characters from the right to return

Nummererforderlich
result if empty3

The result if the string is empty

Zeichenfolgeoptional

See also[Bearbeiten]

Siehe auch[Bearbeiten]