SYNOPSIS
DESCRIPTION
This function will replace all occurrences of %1 in text with the first arg.
Consecutively, all occurrences of %2 will be replaced by the second arg and so on.
Up to ten different replacements are possible, with %0 being used for the tenth value.
This is useful for multilingual applications that have to insert a runtime generated value into a string. Different languages often have a different idea of the order in which text must be inserted.
All occurrences of %x that are higher than the number of arg parameters given are renumbered down. For example, if there are three arg values, %4 would become %1, %5 would become %2, etc... This will cause cascaded use of this function do the right thing.
All arg values are processed in string context, any arg that is not a string will have a tostring() call thrown at it first before being added to the result.
RETURN VALUE
EXAMPLE
This example shows how a date can be formatted properly for the US American or German locale.
An example that shows the renumbering of unused positions.