diff --git a/doc/api/util.md b/doc/api/util.md index 8bcc9ebda10599..5f0cbfc42e1b4e 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -1304,6 +1304,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