function strformat(string, dict) {
    var formatted = string;
    for (var prop in dict) {
        var regexp = new RegExp('\\{' + prop + '\\}', 'gi');
        formatted = formatted.replace(regexp, dict[prop]);
    }
    return formatted;
}
function strformat(string, dict) {
    var formatted = string;
    for (var prop in dict) {
        var regexp = new RegExp('\\{' + prop + '\\}', 'gi');
        formatted = formatted.replace(regexp, dict[prop]);
    }
    return formatted;
}
function strformat ( string , dict ) { var formatted = string ; for ( var prop in dict ) { var regexp = new RegExp ( '\\{' + prop + '\\}' , 'gi' ) ; formatted = formatted . replace ( regexp , dict [ prop ] ) ; } return formatted ; }
Format a string by replacing all keys between { and } with values from the given dictionary
@param  {String} string Format string
@param  {Object} dict   Object containing values for the keys specified in the format string
@return {String}        Formatted string
Format a string by replacing all keys between { and } with values from the given dictionary