doc: fix format docs discrepancy

Only objects and symbols use `util.inspect`, others are simply
concatenated.

Fixes: https://github.com/iojs/io.js/issues/935
PR-URL: https://github.com/iojs/io.js/pull/1255
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
pull/1241/merge
Brendan Ashworth 2015-03-24 22:44:08 -07:00
parent 8a945814dd
commit 45814216ee
1 changed files with 2 additions and 2 deletions

View File

@ -63,8 +63,8 @@ not replaced.
util.format('%s:%s', 'foo'); // 'foo:%s'
If there are more arguments than placeholders, the extra arguments are
converted to strings with `util.inspect()` and these strings are concatenated,
delimited by a space.
coerced to strings (for objects and symbols, `util.inspect()` is used)
and then concatenated, delimited by a space.
util.format('%s:%s', 'foo', 'bar', 'baz'); // 'foo:bar baz'