[#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‐8 string `srcBuffer` into a 0 terminated UTF‐16 string (including the 0 terminating word into the returned count). Optionally specify `endPtr`, referring to one past the last input character. If `endPtr` is not supplied, or is 0, treat `srcBuffer` as 0 terminated. Note that this function will return the size `utf8ToUtf16` will require, assuming the `errorWord` argument to `utf8ToUtf16` is non‐zero. == Synopsis Declared in `<bdlde_charconvertutf16.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static std::size_t computeRequiredUtf16Words( char const* srcBuffer, char const* endPtr = 0); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#