[#BloombergLP-bdlde-CharConvertUtf16-computeRequiredUtf8Bytes-04] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlde.adoc[bdlde]::xref:BloombergLP/bdlde/CharConvertUtf16.adoc[CharConvertUtf16]::computeRequiredUtf8Bytes :relfileprefix: ../../../ :mrdocs: Return the UTF‐8 byte count needed for the given UTF‐16 input. == Synopsis Declared in `<bdlde_charconvertutf16.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static std::size_t computeRequiredUtf8Bytes( char16_t const* srcBuffer, char16_t const* endPtr = 0, xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- == Description Return the number of bytes required to store the UTF‐8 translation of the specified UTF‐16 `srcBuffer`, including the terminating null. == Return Value the number of UTF‐8 bytes required, including the terminating 0 == Parameters [cols="1,4"] |=== | Name| Description | *srcBuffer* | source buffer to measure | *endPtr* | one past the last input character, or 0 if null‐terminated | *byteOrder* | UTF‐16 byte order; host order if unspecified |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#