FireDAC.Stan.Util.FDStr2Curr

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function FDStr2Curr(const AValue: String; ADot: Char = '.'): Currency;
procedure FDStr2Curr(pIn: PChar; ASize: Integer; out ACurr: Currency; ADot: Char = '.');

C++

extern DELPHI_PACKAGE System::Currency __fastcall FDStr2Curr(const System::UnicodeString AValue, System::WideChar ADot = (System::WideChar)(0x2e))/* overload */;

Properties

Type Visibility Source Unit Parent
function public
FireDAC.Stan.Util.pas
FireDAC.Stan.Util.hpp
FireDAC.Stan.Util FireDAC.Stan.Util

Description

Converts a string to a Currency value.

Call FDStr2Curr to convert a string that represents a floating-point value to the corresponding Currency value. The source string, AValue, must consist of an optional sign (+ or -), a string of digits with an optional decimal point, and an optional 'E' or 'e' followed by a signed integer. Leading and trailing blanks are ignored.

Thousand separators and currency symbols are not allowed in the string. If the string does not contain a valid value, FDStr2Curr raises an EConvertError exception.

See Also