format (I18n - JavaScript)

Provides formatting of strings.

The purpose of this function is to format a string using a format description which contains some '%n' character sequences. These sequences are replaced by the corresponding parameter (p1, p2, and so on). The parameters are of type Object and the string counterparts are obtained by calling the toString() method. The main advantage of these functions against standard printf is that the order of parameters can be changed when translating the format, depending of the language used. Note that '%%' is used for introducing a '%' character.

Defined in

I18n

Syntax

format(fmt:string) : string

format(fmt:string, p1:java.lang.Object) : string

format(fmt:string, p1:java.lang.Object, p2:java.lang.Object) : string

format(fmt:string, p1:java.lang.Object, p2:java.lang.Object, p3:java.lang.Object) : string

format(fmt:string, p1:java.lang.Object, p2:java.lang.Object, p3:java.lang.Object, p4:java.lang.Object) : string

format(fmt:string, p1:java.lang.Object, p2:java.lang.Object, p3:java.lang.Object, p4:java.lang.Object, p5:java.lang.Object) : string

Parameters Description
fmt The string format
p1 The first parameter.
p2 The second parameter.
p3 The third parameter.
p4 The fourth parameter.
p5 The fifth parameter
Return value Description
String Returned string.