Appearance
IsCurrencyNumber
Declaration
Function IsCurrencyNumber( const S : string) : Boolean
Example
pascal
procedure OnMapEvent(var Value:Variant);
begin
Value := IsCurrencyNumber('abc123'); //returns false
Value := IsCurrencyNumber('$1,230.00'); //returns true.
Value := IsCurrencyNumber('1230'); //returns true.
end;Description
Returns True or False depending on whether the input string contains only numeric characters or currency format symbols. If this function returns True then you can safely use a Conversion function on it to turn it into a numeric data type.
This function allows for currency symbols defined within the computers regional settings.
Refer IsDigit for a function that checks only the first character to see if it is a digit. Refer to IsNumber for a function that checks if the string contains only numbers without currency formatting.