The format() call mutates the object passed as params, which is unexpected for the caller.
IMHO, when not an exception, format() should just return a formatted string value for the passed parameters, and have no side-effects such as mutating the passed arguments.