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

Return the UTF&hyphen;8 byte count needed for the given UTF&hyphen;16 input&period;

== Synopses

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

Return the UTF&hyphen;8 byte count needed for the given UTF&hyphen;16 input&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 UTF&hyphen;8 byte count needed for the given UTF&hyphen;16 input&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 UTF&hyphen;8 byte count needed for the given UTF&hyphen;16 input&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;_]#

== Return Value

the number of UTF&hyphen;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&hyphen;terminated
| *byteOrder*
| UTF&hyphen;16 byte order&semi; host order if unspecified
|===


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