[#bech32-Decode]
= xref:bech32.adoc[bech32]::Decode
:relfileprefix: ../
:mrdocs:

Decode a Bech32 or Bech32m string&period;

== Synopsis

Declared in `&lt;bech32&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bech32/DecodeResult.adoc[DecodeResult]
Decode(
    std::string const& str,
    xref:bech32/CharLimit.adoc[CharLimit] limit = CharLimit&colon;&colon;BECH32);
----

== Return Value

The decode result&semi; its encoding is Encoding&colon;&colon;INVALID on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *str*
| The string to decode&period;
| *limit*
| The maximum accepted string length&period;
|===


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