Creates a string according to the specified pattern using specified arguments.

The pattern string should contain some text along with format elements looking like:

{ ArgumentIndex }
that are substituted with the string representations of the corresponding arguments.

For example, the call

formatString (
  "The summary includes {1} {0}",
  "components", 5
)
will return the string:
The summary includes 5 components
The Java implementation of this function uses the standard Java API class java.text.MessageFormat and basically looks as follows:
MessageFormat.format(pattern, arguments)
So, the precise syntax and meaning of the formatting pattern can be found in Java API documentation for this class (available at Java Technology website: http://www.oracle.com/technetwork/java/).

Parameters:

pattern

the pattern for the result string
arguments
object(s) to be formatted and substituted