Argomento precedente: formatDateArgomento successivo: getAllAttachments


formatString

La funzione formatString restituisce una stringa dopo la formattazione della stringa specificata con gli argomenti indicati.

Sintassi

resultString = formatString(format, args)

Argomenti

format (Stringa)

Specifica il formato String.

args (Array)

Specifica gli argomenti per la formattazione.

Valore restituito

resultString (String)

Questa funzione restituisce una stringa formattata in base agli argomenti specificati negli argomenti della funzione.

Esempio

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);

Il risultato sarà sString = "d c b a".