String.localeFormat Function
Replaces the format items in a String object with the text equivalent of a corresponding object's value. The current culture is used to format dates and numbers.
var a = String.localeFormat(format, args);
Arguments
format
A format string.args
An array of objects to format.
Return Value
A copy of the string with the formatting applied.
Exceptions
Exception type |
Condition |
---|---|
(Debug) The format parameter is invalid. |
Remarks
Use the localeFormat function to replace specified format items with the text representation of the corresponding object values. The objects argument can contain a single object or an array of objects. The format argument contains zero or more runs of fixed text intermixed with one or more format items. Each format item corresponds to an object in objects. At run time, each format item is replaced by the string representation of the corresponding object in the list.
The current culture is provided by the CurrentCulture field of the CultureInfo class.