[#ParseFixedPoint]
= ParseFixedPoint
:mrdocs:

Parse number as fixed point according to JSON number syntax&period;

== Synopsis

Declared in `&lt;util&sol;strencodings&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
bool
ParseFixedPoint(
    std::string&lowbar;view val,
    int decimals,
    int64&lowbar;t* amount&lowbar;out);
----

== Description

[NOTE]
====
The result must be in the range (&hyphen;10&circ;18,10&circ;18), otherwise an overflow error will trigger&period;

====

== Return Value

true on success, false on error&period;

[NOTE]
====
The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^].
====
== Parameters

[cols="1,4"]
|===
| Name| Description
| *val*
| The string to parse&period;
| *decimals*
| Number of digits after the decimal point in the fixed&hyphen;point result&period;
| *amount&lowbar;out*
| Set to the parsed value scaled by 10&circ;decimals on success&period;
|===


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