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

Return the number of words required to store the translation of the specified UTF&hyphen;8 string `srcBuffer` into a 0 terminated UTF&hyphen;16 string (including the 0 terminating word into the returned count)&period; Optionally specify `endPtr`, referring to one past the last input character&period; If `endPtr` is not supplied, or is 0, treat `srcBuffer` as 0 terminated&period; Note that this function will return the size `utf8ToUtf16` will require, assuming the `errorWord` argument to `utf8ToUtf16` is non&hyphen;zero&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
std::size&lowbar;t
computeRequiredUtf16Words(
    char const* srcBuffer,
    char const* endPtr = 0);
----


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