Predloga:Trunc

Iz Wikipedije, proste enciklopedije
Skoči na: navigacija, iskanje
Documentation icon Dokumentacija predloge[predogled] [uredi] [zgodovina] [osveži]

Usage[uredi | uredi kodo]

{{Trunc|<string>|<count>}}

Gives the <count> characters from the start of the string.

If <count> is invalid, empty or undefined, it just returns the string.

Examples[uredi | uredi kodo]

  • {{Trunc | Lorem ipsum dolor sit amet | 10 }} → Lorem ipsu
  • {{Trunc | Lorem ipsum dolor sit amet | 1 }} → L
  • {{Trunc | Lorem ipsum dolor sit amet | 0 }}
  • {{Trunc | Lorem ipsum dolor sit amet | }} → Lorem ipsum dolor sit amet
  • {{Trunc | Lorem ipsum dolor sit amet }} → Lorem ipsum dolor sit amet
  • {{Trunc | Lorem ipsum dolor sit amet | foo }} → Lorem ipsum dolor sit amet
  • {{Trunc | Lorem ipsum dolor sit amet | 40 }} → Lorem ipsum dolor sit ametLorem ipsum do

See also[uredi | uredi kodo]

Opis vseh predlog za delo z nizi