[#ParseFixedPoint] = ParseFixedPoint :mrdocs: Parse number as fixed point according to JSON number syntax. == Synopsis Declared in `<util/strencodings.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[nodiscard]] bool ParseFixedPoint( std::string_view val, int decimals, int64_t* amount_out); ---- == Description [NOTE] ==== The result must be in the range (‐10ˆ18,10ˆ18), otherwise an overflow error will trigger. ==== == Return Value true on success, false on error. [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. | *decimals* | Number of digits after the decimal point in the fixed‐point result. | *amount_out* | Set to the parsed value scaled by 10ˆdecimals on success. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#