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

`computeRequiredUtf8Bytes` overloads

== Synopses

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

Return the number of bytes required to store the UTF&hyphen;8 translation of the specified UTF&hyphen;16 `srcBuffer`, including the terminating null&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
std::size&lowbar;t
xref:BloombergLP/bdlde/CharConvertUtf16/computeRequiredUtf8Bytes-04.adoc[computeRequiredUtf8Bytes](
    char16&lowbar;t const* srcBuffer,
    char16&lowbar;t const* endPtr = 0,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/computeRequiredUtf8Bytes-04.adoc[_» more&period;&period;&period;_]#

Return the length needed in bytes, for a buffer to hold the null&hyphen;terminated UTF&hyphen;8 string translated from the specified UTF&hyphen;16 string `srcBuffer` (including the terminating &apos;0&apos; in 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; Optionally specify `byteOrder` indicating the byte order of `srcBuffer`&semi; if `byteOrder` is not supplied, the host byte order is used&period; Note that this function will return the size `utf16ToUtf8` will require, assuming the `errorByte` argument to `utf16ToUtf8` is non&hyphen;zero&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
std::size&lowbar;t
xref:BloombergLP/bdlde/CharConvertUtf16/computeRequiredUtf8Bytes-05.adoc[computeRequiredUtf8Bytes](
    unsigned short const* srcBuffer,
    unsigned short const* endPtr = 0,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/computeRequiredUtf8Bytes-05.adoc[_» more&period;&period;&period;_]#

Return the number of bytes required to store the UTF&hyphen;8 translation of the specified UTF&hyphen;16 `srcBuffer`, including the terminating null&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
std::size&lowbar;t
xref:BloombergLP/bdlde/CharConvertUtf16/computeRequiredUtf8Bytes-01.adoc[computeRequiredUtf8Bytes](
    wchar&lowbar;t const* srcBuffer,
    wchar&lowbar;t const* endPtr = 0,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/computeRequiredUtf8Bytes-01.adoc[_» more&period;&period;&period;_]#


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