[#BloombergLP-bdlde-CharConvertUtf32-utf8ToUtf32-0a0]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlde.adoc[bdlde]::xref:BloombergLP/bdlde/CharConvertUtf32.adoc[CharConvertUtf32]::utf8ToUtf32
:relfileprefix: ../../../
:mrdocs:

`utf8ToUtf32` overloads

== Synopses

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

Convert the UTF&hyphen;8 source into UTF&hyphen;32 in the destination vector&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf32/utf8ToUtf32-07.adoc[utf8ToUtf32](
    xref:bsl/vector-00d.adoc[bsl::vector&lt;unsigned int&gt;]* dstVector,
    std::string&lowbar;view const& srcString,
    unsigned int errorWord = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf32/utf8ToUtf32-07.adoc[_» more&period;&period;&period;_]#

Convert the UTF&hyphen;8 `srcString` into UTF&hyphen;32 in `dstVector`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf32/utf8ToUtf32-04.adoc[utf8ToUtf32](
    xref:bsl/vector-00d.adoc[bsl::vector&lt;unsigned int&gt;]* dstVector,
    char const* srcString,
    unsigned int errorWord = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

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

Convert the UTF&hyphen;8 source into UTF&hyphen;32 in the destination vector&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf32/utf8ToUtf32-06.adoc[utf8ToUtf32](
    std::pmr::vector&lt;unsigned int&gt;* dstVector,
    std::string&lowbar;view const& srcString,
    unsigned int errorWord = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf32/utf8ToUtf32-06.adoc[_» more&period;&period;&period;_]#

Convert the UTF&hyphen;8 source into UTF&hyphen;32 in the destination vector&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf32/utf8ToUtf32-00.adoc[utf8ToUtf32](
    std::pmr::vector&lt;unsigned int&gt;* dstVector,
    char const* srcString,
    unsigned int errorWord = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf32/utf8ToUtf32-00.adoc[_» more&period;&period;&period;_]#

Convert the UTF&hyphen;8 source into UTF&hyphen;32 in the destination vector&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf32/utf8ToUtf32-0ac.adoc[utf8ToUtf32](
    std::vector&lt;unsigned int&gt;* dstVector,
    std::string&lowbar;view const& srcString,
    unsigned int errorWord = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf32/utf8ToUtf32-0ac.adoc[_» more&period;&period;&period;_]#

Convert the UTF&hyphen;8 source into UTF&hyphen;32 in the destination vector&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf32/utf8ToUtf32-0e.adoc[utf8ToUtf32](
    std::vector&lt;unsigned int&gt;* dstVector,
    char const* srcString,
    unsigned int errorWord = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf32/utf8ToUtf32-0e.adoc[_» more&period;&period;&period;_]#

Convert the UTF&hyphen;8 source into UTF&hyphen;32 in the destination buffer&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf32/utf8ToUtf32-02.adoc[utf8ToUtf32](
    unsigned int* dstBuffer,
    std::size&lowbar;t dstCapacity,
    std::string&lowbar;view const& srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    unsigned int errorWord = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf32/utf8ToUtf32-02.adoc[_» more&period;&period;&period;_]#

Convert the UTF&hyphen;8 `srcString` into UTF&hyphen;32 in `dstBuffer`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf32/utf8ToUtf32-0c.adoc[utf8ToUtf32](
    unsigned int* dstBuffer,
    std::size&lowbar;t dstCapacity,
    char const* srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    unsigned int errorWord = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf32/utf8ToUtf32-0c.adoc[_» more&period;&period;&period;_]#

== Return Value

* 0 on success and a non&hyphen;zero status otherwise
* 0 on success and `CharConvertStatus&colon;&colon;k&lowbar;INVALID&lowbar;INPUT&lowbar;BIT` otherwise
* 0 on success and a bit&hyphen;wise OR of `CharConvertStatus&colon;&colon;Enum` masks otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *dstVector*
| destination for the UTF&hyphen;32 conversion result
| *srcString*
| UTF&hyphen;8 source string view to convert
| *errorWord*
| optional substitute for invalid encodings&semi; 0 ignores them
| *byteOrder*
| byte order of the UTF&hyphen;32 output (host by default)
| *dstBuffer*
| buffer for the UTF&hyphen;32 conversion result
| *dstCapacity*
| capacity of `dstBuffer` in words
| *numCodePointsWritten*
| if non&hyphen;null, receives the number of code points written (including the terminator)
|===


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