diff --git a/doc/api/util.md b/doc/api/util.md index dc47704e0b74f7..e0912093af3640 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -1306,6 +1306,17 @@ const { read, written } = encoder.encodeInto(src, dest); The encoding supported by the `TextEncoder` instance. Always set to `'utf-8'`. +## `util.toUSVString(string)` + + +* `string` {string} + +Returns the `string` after replacing any surrogate code points +(or equivalently, any unpaired surrogate code units) with the +Unicode "replacement character" U+FFFD. + ## `util.types` - -* `string` {string} - -Returns the `string` after replacing any surrogate code points -(or equivalently, any unpaired surrogate code units) with the -Unicode "replacement character" U+FFFD. - [Common System Errors]: errors.md#errors_common_system_errors [Custom inspection functions on objects]: #util_custom_inspection_functions_on_objects [Custom promisified functions]: #util_custom_promisified_functions