Smarty Icon

You may use the Smarty logo according to the trademark notice.

Smarty Template Engine Smarty Template Engine

For sponsorship, advertising, news or other inquiries, contact us at:

Sites Using Smarty

Advertisement

string_format (Zeichenkette formatieren)

Parameter Position Typ Erfoderlich Standardwert Beschreibung
1 string Ja n/a Das zu verwendende Format (sprintf).

Wird verwendet um eine Zeichenkette, wie zum Beispiel dezimale Werte, zu formatieren. Folgt der Formatierungs-Syntax von sprintf.

Example 5.18. string_format (Zeichenkette formatieren)

{$wert}
{$wert|string_format:"%.2f"}
{$wert|string_format:"%d"}

AUSGABE:

23.5787446
23.58
24