[#BloombergLP-bdlde-CharConvertUtf16]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlde.adoc[bdlde]::CharConvertUtf16
:relfileprefix: ../../
:mrdocs:

Provide a namespace for static UTF&hyphen;8&sol;UTF&hyphen;16 conversion utilities&period;

== Synopsis

Declared in `&lt;bdlde&lowbar;charconvertutf16&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
struct CharConvertUtf16;
----

== Description

This `struct` provides a namespace for a suite of static functions to convert buffers or containers between UTF&hyphen;8 and UTF&hyphen;16&period; Note that Byte Order Mark (BOM) sequences are neither generated nor recognized as special&period; If a BOM is present in the input, it will be translated, whether correct (`0xfeff`) or incorrect (`0xfffe`), into the output without any special handling&period;

== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlde/CharConvertUtf16/computeRequiredUtf16Words.adoc[`computeRequiredUtf16Words`] 
| Return the UTF&hyphen;16 word count needed for the given UTF&hyphen;8 input&period;
| xref:BloombergLP/bdlde/CharConvertUtf16/computeRequiredUtf8Bytes-08.adoc[`computeRequiredUtf8Bytes`] 
| Return the UTF&hyphen;8 byte count needed for the given UTF&hyphen;16 input&period;
| xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0bf.adoc[`utf16ToUtf8`] 
| `utf16ToUtf8` overloads
| xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-014.adoc[`utf8ToUtf16`] 
| `utf8ToUtf16` overloads
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
