What does this javascript function do? Does it make sense?
<pre><code>String.format = function()
{   var s = arguments[0];
    for (var i = 0; i &lt; arguments.length - 1; i++)
    {   var reg = new RegExp("\\{" + i + "\\}", "gm");             
        s = s.replace(reg, arguments[i + 1]);
    }
  return s;
}
</code></pre>

<p>Please explain. Thanks.</p>
