Previous Topic: formatDateNext Topic: getAllAttachments


formatString

The formatString function returns a string after formatting the specified string with the mentioned arguments.

Syntax

resultString = formatString(format, args)

Arguments

format (String)

Specifies the format string.

args (Array)

Specifies the arguments for formatting.

Return Value

resultString (String)

This function returns a string, formatted according to the arguments provided in the function arguments.

Example

var myArray = new Array();
myArray[0] = "a";
myArray[1] = "b";
myArray[2] = "c";
myArray[3] = "d";
sString = formatString("%4$s %3$2s %2$2s %1$2s", myArray);

This results in sString = "d c b a".